updateProfile
This commit is contained in:
@@ -3,16 +3,19 @@ import 'package:grocery_app/src/common_widget/network_image.dart';
|
||||
import 'package:grocery_app/src/logic/provider/home_provider.dart';
|
||||
import 'package:grocery_app/src/ui/card_checkout/card_checkout_screen.dart';
|
||||
import 'package:grocery_app/src/ui/edit_profile/edit_profile_screen.dart';
|
||||
import 'package:grocery_app/src/ui/map/google_map.dart';
|
||||
|
||||
import 'package:grocery_app/src/ui/mapscreen/map_screen.dart';
|
||||
import 'package:grocery_app/src/ui/message/message_screen.dart';
|
||||
import 'package:grocery_app/src/ui/notification/notification_screen.dart';
|
||||
import 'package:grocery_app/src/ui/rating_review/rating_review_screen.dart';
|
||||
import 'package:grocery_app/src/ui/static_page/static_page_screen.dart';
|
||||
import 'package:grocery_app/utils/constants/color_constant.dart';
|
||||
import 'package:grocery_app/utils/constants/shared_pref_utils.dart';
|
||||
import 'package:grocery_app/utils/constants/string_constant.dart';
|
||||
import 'package:grocery_app/utils/extensions/uicontext.dart';
|
||||
import 'package:material_design_icons_flutter/material_design_icons_flutter.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'package:shared_preferences/shared_preferences.dart';
|
||||
|
||||
class ProfileScreen extends StatefulWidget {
|
||||
const ProfileScreen({super.key});
|
||||
@@ -25,7 +28,8 @@ class _ProfileScreenState extends State<ProfileScreen> {
|
||||
var top = 0.0;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
Widget build(BuildContext context)
|
||||
{
|
||||
return Scaffold(
|
||||
body: NestedScrollView(
|
||||
headerSliverBuilder: (BuildContext context, bool innerBoxIsScrolled) {
|
||||
@@ -69,34 +73,34 @@ class _ProfileScreenState extends State<ProfileScreen> {
|
||||
AppNetworkImage(
|
||||
height: top < 150 ? 30 : 50,
|
||||
width: top < 150 ? 30 : 50,
|
||||
imageUrl:
|
||||
imageUrl: "${APPSTRING.userProfile ?? ""}" ??
|
||||
"https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTdQLwDqDwd2JfzifvfBTFT8I7iKFFevcedYg&s",
|
||||
radius: 90,
|
||||
backGroundColor: Colors.white,
|
||||
boxFit: BoxFit.fill,
|
||||
),
|
||||
top > 100
|
||||
? Positioned(
|
||||
bottom: 0,
|
||||
right: 0,
|
||||
child: Container(
|
||||
height: 18,
|
||||
width: 18,
|
||||
decoration: BoxDecoration(
|
||||
color: APPCOLOR.lightGreen,
|
||||
border: Border.all(
|
||||
color: Colors.white),
|
||||
borderRadius:
|
||||
BorderRadius.circular(5)),
|
||||
child: Center(
|
||||
child: Icon(
|
||||
MdiIcons.pencil,
|
||||
size: 10,
|
||||
color: Colors.white,
|
||||
),
|
||||
),
|
||||
))
|
||||
: const SizedBox(),
|
||||
// top > 100
|
||||
// ? Positioned(
|
||||
// bottom: 0,
|
||||
// right: 0,
|
||||
// child: Container(
|
||||
// height: 18,
|
||||
// width: 18,
|
||||
// decoration: BoxDecoration(
|
||||
// color: APPCOLOR.lightGreen,
|
||||
// border: Border.all(
|
||||
// color: Colors.white),
|
||||
// borderRadius:
|
||||
// BorderRadius.circular(5)),
|
||||
// child: Center(
|
||||
// child: Icon(
|
||||
// MdiIcons.pencil,
|
||||
// size: 10,
|
||||
// color: Colors.white,
|
||||
// ),
|
||||
// ),
|
||||
// ))
|
||||
// : const SizedBox(),
|
||||
],
|
||||
),
|
||||
const SizedBox(
|
||||
@@ -108,13 +112,13 @@ class _ProfileScreenState extends State<ProfileScreen> {
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Text(
|
||||
"Smith Mate",
|
||||
APPSTRING.userName ?? "",
|
||||
style: context.customExtraBold(
|
||||
top < 100 ? Colors.black : Colors.white,
|
||||
14),
|
||||
),
|
||||
Text(
|
||||
'smithmate@example.com',
|
||||
APPSTRING.emailName,
|
||||
style: context.customRegular(
|
||||
top < 100 ? Colors.black : Colors.white,
|
||||
10),
|
||||
@@ -196,30 +200,31 @@ class _ProfileScreenState extends State<ProfileScreen> {
|
||||
title: const Text('Notifications'),
|
||||
trailing: Icon(MdiIcons.chevronRight),
|
||||
),
|
||||
ListTile(
|
||||
onTap: () {
|
||||
Navigator.of(context).push(MaterialPageRoute(
|
||||
builder: (context) {
|
||||
return const RatingReviewScreen();
|
||||
},
|
||||
));
|
||||
},
|
||||
leading: Icon(MdiIcons.starOutline),
|
||||
title: const Text('Rating & Review'),
|
||||
trailing: Icon(MdiIcons.chevronRight),
|
||||
),
|
||||
ListTile(
|
||||
onTap: () {
|
||||
Navigator.of(context).push(MaterialPageRoute(
|
||||
builder: (context) {
|
||||
return const MessageScreen();
|
||||
},
|
||||
));
|
||||
},
|
||||
leading: Icon(MdiIcons.messageOutline),
|
||||
title: const Text('Driver Message'),
|
||||
trailing: Icon(MdiIcons.chevronRight),
|
||||
),
|
||||
// ListTile(
|
||||
// onTap: () {
|
||||
// Navigator.of(context).push(MaterialPageRoute(
|
||||
// builder: (context) {
|
||||
// return const RatingReviewScreen();
|
||||
// },
|
||||
// ));
|
||||
// },
|
||||
// leading: Icon(MdiIcons.starOutline),
|
||||
// title: const Text('Rating & Review'),
|
||||
// trailing: Icon(MdiIcons.chevronRight),
|
||||
// ),
|
||||
// ListTile(
|
||||
// onTap: () {
|
||||
// Navigator.of(context).push(MaterialPageRoute(
|
||||
// builder: (context) {
|
||||
// return const MessageScreen();
|
||||
// },
|
||||
// ));
|
||||
// },
|
||||
// leading: Icon(MdiIcons.messageOutline),
|
||||
// title: const Text('Driver Message'),
|
||||
// trailing: Icon(MdiIcons.chevronRight),
|
||||
// ),
|
||||
|
||||
ListTile(
|
||||
onTap: () {
|
||||
Navigator.of(context).push(MaterialPageRoute(
|
||||
@@ -248,24 +253,12 @@ class _ProfileScreenState extends State<ProfileScreen> {
|
||||
title: const Text('Term & Conditions'),
|
||||
trailing: Icon(MdiIcons.chevronRight),
|
||||
),
|
||||
ListTile(
|
||||
onTap: () {},
|
||||
leading: Icon(MdiIcons.basketOutline),
|
||||
title: const Text('Grocery List'),
|
||||
trailing: Icon(MdiIcons.chevronRight),
|
||||
),
|
||||
ListTile(
|
||||
onTap: () {
|
||||
Navigator.of(context).push(MaterialPageRoute(
|
||||
builder: (context) {
|
||||
return MapScreen();
|
||||
},
|
||||
));
|
||||
},
|
||||
leading: Icon(MdiIcons.basketOutline),
|
||||
title: const Text('Map List'),
|
||||
trailing: Icon(MdiIcons.chevronRight),
|
||||
),
|
||||
// ListTile(
|
||||
// onTap: () {},
|
||||
// leading: Icon(MdiIcons.basketOutline),
|
||||
// title: const Text('Grocery List'),
|
||||
// trailing: Icon(MdiIcons.chevronRight),
|
||||
// ),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user