feat&fix: add screen for cart and change color bg
This commit is contained in:
parent
9c61b87c6d
commit
12ecf1c84b
|
@ -1,7 +1,7 @@
|
||||||
export 'package:go_router/go_router.dart';
|
export 'package:go_router/go_router.dart';
|
||||||
export 'package:rijig_mobile/core/utils/navigation.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/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/home/presentation/screen/home_screen.dart';
|
||||||
export 'package:rijig_mobile/features/profil/presentation/screen/profil_screen.dart';
|
export 'package:rijig_mobile/features/profil/presentation/screen/profil_screen.dart';
|
||||||
export 'package:rijig_mobile/features/requestpick/presentation/screen/requestpickup_screen.dart';
|
export 'package:rijig_mobile/features/requestpick/presentation/screen/requestpickup_screen.dart';
|
||||||
|
|
|
@ -3,7 +3,7 @@ import 'package:iconsax_flutter/iconsax_flutter.dart';
|
||||||
import 'package:rijig_mobile/core/utils/guide.dart';
|
import 'package:rijig_mobile/core/utils/guide.dart';
|
||||||
import 'package:rijig_mobile/core/router.dart';
|
import 'package:rijig_mobile/core/router.dart';
|
||||||
import 'package:rijig_mobile/features/activity/presentation/screen/activity_screen.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/home/presentation/screen/home_screen.dart';
|
||||||
import 'package:rijig_mobile/features/profil/presentation/screen/profil_screen.dart';
|
import 'package:rijig_mobile/features/profil/presentation/screen/profil_screen.dart';
|
||||||
import 'package:shared_preferences/shared_preferences.dart';
|
import 'package:shared_preferences/shared_preferences.dart';
|
||||||
|
|
|
@ -15,6 +15,7 @@ class _ActivityScreenState extends State<ActivityScreen> {
|
||||||
return DefaultTabController(
|
return DefaultTabController(
|
||||||
length: 3,
|
length: 3,
|
||||||
child: Scaffold(
|
child: Scaffold(
|
||||||
|
backgroundColor: whiteColor,
|
||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
title: Text('Aktifitas', style: Tulisan.subheading()),
|
title: Text('Aktifitas', style: Tulisan.subheading()),
|
||||||
centerTitle: true,
|
centerTitle: true,
|
||||||
|
|
|
@ -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")),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -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");
|
||||||
|
},
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
|
@ -16,6 +16,7 @@ class _ProfilScreenState extends State<ProfilScreen> {
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
|
backgroundColor: whiteColor,
|
||||||
body: SafeArea(
|
body: SafeArea(
|
||||||
child: Stack(
|
child: Stack(
|
||||||
children: [
|
children: [
|
||||||
|
@ -52,20 +53,6 @@ class _ProfilScreenState extends State<ProfilScreen> {
|
||||||
Text('+62878774527342'),
|
Text('+62878774527342'),
|
||||||
SizedBox(height: 20),
|
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(
|
Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
children: [
|
children: [
|
||||||
|
@ -87,12 +74,7 @@ class _ProfilScreenState extends State<ProfilScreen> {
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: PaddingCustom().paddingHorizontal(20),
|
padding: PaddingCustom().paddingHorizontal(20),
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [ProfileMenuOptions(), Gap(30), ButtonLogout()],
|
||||||
ProfileMenuOptions(),
|
|
||||||
// SizedBox(height: 20),
|
|
||||||
Gap(30),
|
|
||||||
ButtonLogout(),
|
|
||||||
],
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_dotenv/flutter_dotenv.dart';
|
import 'package:flutter_dotenv/flutter_dotenv.dart';
|
||||||
import 'package:provider/provider.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/globaldata/trash/trash_viewmodel.dart';
|
||||||
import 'package:rijig_mobile/widget/appbar.dart';
|
import 'package:rijig_mobile/widget/appbar.dart';
|
||||||
import 'package:shimmer/shimmer.dart';
|
import 'package:shimmer/shimmer.dart';
|
||||||
|
@ -17,6 +18,7 @@ class RequestPickScreen extends StatelessWidget {
|
||||||
final String? baseUrl = dotenv.env["BASE_URL"];
|
final String? baseUrl = dotenv.env["BASE_URL"];
|
||||||
|
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
|
backgroundColor: whiteColor,
|
||||||
appBar: CustomAppBar(judul: "Pilih sampah"),
|
appBar: CustomAppBar(judul: "Pilih sampah"),
|
||||||
body: Consumer<TrashViewModel>(
|
body: Consumer<TrashViewModel>(
|
||||||
builder: (context, viewModel, child) {
|
builder: (context, viewModel, child) {
|
||||||
|
|
Loading…
Reference in New Issue