feat&fix: add screen for cart and change color bg

This commit is contained in:
pahmiudahgede 2025-05-17 01:17:10 +07:00
parent 9c61b87c6d
commit 12ecf1c84b
7 changed files with 186 additions and 42 deletions

View File

@ -1,7 +1,7 @@
export 'package:go_router/go_router.dart';
export 'package:rijig_mobile/core/utils/navigation.dart';
export 'package:rijig_mobile/features/activity/presentation/screen/activity_screen.dart';
export 'package:rijig_mobile/features/cart/cart_screen.dart';
export 'package:rijig_mobile/features/cart/presentation/cart_screen.dart';
export 'package:rijig_mobile/features/home/presentation/screen/home_screen.dart';
export 'package:rijig_mobile/features/profil/presentation/screen/profil_screen.dart';
export 'package:rijig_mobile/features/requestpick/presentation/screen/requestpickup_screen.dart';

View File

@ -3,7 +3,7 @@ import 'package:iconsax_flutter/iconsax_flutter.dart';
import 'package:rijig_mobile/core/utils/guide.dart';
import 'package:rijig_mobile/core/router.dart';
import 'package:rijig_mobile/features/activity/presentation/screen/activity_screen.dart';
import 'package:rijig_mobile/features/cart/cart_screen.dart';
import 'package:rijig_mobile/features/cart/presentation/cart_screen.dart';
import 'package:rijig_mobile/features/home/presentation/screen/home_screen.dart';
import 'package:rijig_mobile/features/profil/presentation/screen/profil_screen.dart';
import 'package:shared_preferences/shared_preferences.dart';

View File

@ -15,6 +15,7 @@ class _ActivityScreenState extends State<ActivityScreen> {
return DefaultTabController(
length: 3,
child: Scaffold(
backgroundColor: whiteColor,
appBar: AppBar(
title: Text('Aktifitas', style: Tulisan.subheading()),
centerTitle: true,

View File

@ -1,20 +0,0 @@
import 'package:flutter/material.dart';
import 'package:rijig_mobile/core/utils/guide.dart';
class CartScreen extends StatefulWidget {
const CartScreen({super.key});
@override
State<CartScreen> createState() => _CartScreenState();
}
class _CartScreenState extends State<CartScreen> {
@override
Widget build(BuildContext context) {
final titleofscreen = "Cart";
return Scaffold(
backgroundColor: whiteColor,
body: Center(child: Text("ini adalah halaman $titleofscreen")),
);
}
}

View File

@ -0,0 +1,179 @@
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");
},
),
),
],
),
),
),
);
}
}

View File

@ -16,6 +16,7 @@ class _ProfilScreenState extends State<ProfilScreen> {
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: whiteColor,
body: SafeArea(
child: Stack(
children: [
@ -52,20 +53,6 @@ class _ProfilScreenState extends State<ProfilScreen> {
Text('+62878774527342'),
SizedBox(height: 20),
// Row(
// children: [
// Text(
// 'Tipe Kontributor: ',
// style: TextStyle(fontWeight: FontWeight.bold),
// ),
// Chip(
// label: Text('Personal'),
// backgroundColor: Colors.green,
// labelStyle: TextStyle(color: Colors.white),
// ),
// ],
// ),
// SizedBox(height: 20),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
@ -87,12 +74,7 @@ class _ProfilScreenState extends State<ProfilScreen> {
child: Padding(
padding: PaddingCustom().paddingHorizontal(20),
child: Column(
children: [
ProfileMenuOptions(),
// SizedBox(height: 20),
Gap(30),
ButtonLogout(),
],
children: [ProfileMenuOptions(), Gap(30), ButtonLogout()],
),
),
),

View File

@ -1,6 +1,7 @@
import 'package:flutter/material.dart';
import 'package:flutter_dotenv/flutter_dotenv.dart';
import 'package:provider/provider.dart';
import 'package:rijig_mobile/core/utils/guide.dart';
import 'package:rijig_mobile/globaldata/trash/trash_viewmodel.dart';
import 'package:rijig_mobile/widget/appbar.dart';
import 'package:shimmer/shimmer.dart';
@ -17,6 +18,7 @@ class RequestPickScreen extends StatelessWidget {
final String? baseUrl = dotenv.env["BASE_URL"];
return Scaffold(
backgroundColor: whiteColor,
appBar: CustomAppBar(judul: "Pilih sampah"),
body: Consumer<TrashViewModel>(
builder: (context, viewModel, child) {