180 lines
5.9 KiB
Dart
180 lines
5.9 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
|
import 'package:gap/gap.dart';
|
|
import 'package:rijig_mobile/core/utils/guide.dart';
|
|
import 'package:rijig_mobile/widget/buttoncard.dart';
|
|
|
|
class CartScreen extends StatefulWidget {
|
|
const CartScreen({super.key});
|
|
|
|
@override
|
|
State<CartScreen> createState() => _CartScreenState();
|
|
}
|
|
|
|
class _CartScreenState extends State<CartScreen> {
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Scaffold(
|
|
backgroundColor: whiteColor,
|
|
appBar: AppBar(
|
|
title: Text('Keranjang', style: Tulisan.subheading()),
|
|
backgroundColor: whiteColor,
|
|
),
|
|
body: Padding(
|
|
padding: const EdgeInsets.all(16.0),
|
|
child: SingleChildScrollView(
|
|
child: Column(
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
children: [
|
|
Container(
|
|
padding: EdgeInsets.all(20),
|
|
width: double.infinity,
|
|
decoration: BoxDecoration(
|
|
color: Colors.white,
|
|
borderRadius: BorderRadius.circular(10),
|
|
boxShadow: [
|
|
BoxShadow(
|
|
color: Colors.grey.withValues(alpha: 0.1),
|
|
spreadRadius: 1,
|
|
blurRadius: 8,
|
|
),
|
|
],
|
|
),
|
|
child: Column(
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
children: [
|
|
Text(
|
|
'Lokasi Penjemputan',
|
|
style: TextStyle(
|
|
fontWeight: FontWeight.bold,
|
|
fontSize: 16,
|
|
),
|
|
),
|
|
SizedBox(height: 10),
|
|
Text(
|
|
'Lokasi harus di Jember',
|
|
style: TextStyle(fontSize: 14),
|
|
),
|
|
|
|
Gap(15),
|
|
CardButtonOne(
|
|
textButton: "Pilih Alamat",
|
|
fontSized: 16.sp,
|
|
color: primaryColor,
|
|
colorText: whiteColor,
|
|
borderRadius: 9,
|
|
horizontal: double.infinity,
|
|
vertical: 40,
|
|
onTap: () {
|
|
debugPrint("lanjutkan tapped");
|
|
},
|
|
),
|
|
],
|
|
),
|
|
),
|
|
|
|
SizedBox(height: 20),
|
|
|
|
Container(
|
|
padding: EdgeInsets.all(20),
|
|
decoration: BoxDecoration(
|
|
color: Colors.white,
|
|
borderRadius: BorderRadius.circular(10),
|
|
boxShadow: [
|
|
BoxShadow(
|
|
color: Colors.grey.withValues(alpha: 0.1),
|
|
spreadRadius: 1,
|
|
blurRadius: 8,
|
|
),
|
|
],
|
|
),
|
|
child: Column(
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
children: [
|
|
Text(
|
|
'Jenis Sampah',
|
|
style: TextStyle(
|
|
fontWeight: FontWeight.bold,
|
|
fontSize: 16,
|
|
),
|
|
),
|
|
SizedBox(height: 10),
|
|
Row(
|
|
children: [
|
|
Icon(Icons.delete, color: Colors.blue),
|
|
SizedBox(width: 8),
|
|
Text('Plastik', style: TextStyle(fontSize: 14)),
|
|
Spacer(),
|
|
Row(
|
|
children: [
|
|
IconButton(
|
|
onPressed: () {},
|
|
icon: Icon(Icons.remove),
|
|
),
|
|
Text('4.75 kg'),
|
|
IconButton(onPressed: () {}, icon: Icon(Icons.add)),
|
|
],
|
|
),
|
|
],
|
|
),
|
|
SizedBox(height: 10),
|
|
Text(
|
|
'Dijumlahkan: 4.75 kg',
|
|
style: TextStyle(
|
|
fontWeight: FontWeight.bold,
|
|
fontSize: 14,
|
|
),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
SizedBox(height: 20),
|
|
|
|
Container(
|
|
padding: EdgeInsets.all(20),
|
|
decoration: BoxDecoration(
|
|
color: Colors.white,
|
|
borderRadius: BorderRadius.circular(10),
|
|
boxShadow: [
|
|
BoxShadow(
|
|
color: Colors.grey.withValues(alpha: 0.1),
|
|
spreadRadius: 1,
|
|
blurRadius: 8,
|
|
),
|
|
],
|
|
),
|
|
child: Row(
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
children: [
|
|
Text(
|
|
'Berat Total',
|
|
style: TextStyle(fontWeight: FontWeight.bold),
|
|
),
|
|
Text('4.75 kg', style: TextStyle(fontSize: 18)),
|
|
],
|
|
),
|
|
),
|
|
SizedBox(height: 20),
|
|
|
|
Center(
|
|
child: CardButtonOne(
|
|
textButton: "Lanjutkan",
|
|
fontSized: 16.sp,
|
|
color: primaryColor,
|
|
colorText: whiteColor,
|
|
borderRadius: 9,
|
|
horizontal: double.infinity,
|
|
vertical: 60,
|
|
onTap: () {
|
|
debugPrint("lanjutkan tapped");
|
|
},
|
|
),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|