Skip to content

Commit

Permalink
UI changes
Browse files Browse the repository at this point in the history
  • Loading branch information
thenifemi committed Jul 23, 2020
1 parent f0caebb commit 394f7c6
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 16 deletions.
2 changes: 1 addition & 1 deletion lib/screens/tab_screens/homeScreen_pages/cart2.dart
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class _Cart2State extends State<Cart2> {
color: MColors.textDark,
),
onPressed: () {
Navigator.of(context).pop();
Navigator.pop(context, true);
},
),
Text(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,10 @@ class _ProductDetailsState extends State<ProductDetails> {
size: 22.0,
),
onPressed: () {
Navigator.of(context).pop(prod);
Navigator.pop(
context,
_isProductadded,
);
},
),
expandedHeight: (MediaQuery.of(context).size.height) / 2.3,
Expand Down
46 changes: 35 additions & 11 deletions lib/screens/tab_screens/settings.dart
Original file line number Diff line number Diff line change
Expand Up @@ -169,18 +169,42 @@ class _SettingsScreenState extends State<SettingsScreen> {
crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[
Center(
child: Padding(
padding: const EdgeInsets.all(10.0),
child: Hero(
tag: "profileAvatar",
child: Container(
child: SvgPicture.asset(
"assets/images/femaleAvatar.svg",
height: 90,
child: GestureDetector(
onTap: () async {
UserDataProfileNotifier profileNotifier =
Provider.of<UserDataProfileNotifier>(context,
listen: false);
var navigationResult =
await Navigator.of(context).push(
MaterialPageRoute(
builder: (context) => EditProfile(user),
),
decoration: BoxDecoration(
shape: BoxShape.circle,
color: MColors.dashPurple,
);
if (navigationResult == true) {
setState(() {
getProfile(profileNotifier);
});
showSimpleSnack(
"Profile has been updated",
Icons.check_circle_outline,
Colors.green,
_scaffoldKey,
);
}
},
child: Padding(
padding: const EdgeInsets.all(10.0),
child: Hero(
tag: "profileAvatar",
child: Container(
child: SvgPicture.asset(
"assets/images/femaleAvatar.svg",
height: 90,
),
decoration: BoxDecoration(
shape: BoxShape.circle,
color: MColors.dashPurple,
),
),
),
),
Expand Down
12 changes: 9 additions & 3 deletions lib/widgets/tabsLayout.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import 'package:flutter/material.dart';
import 'package:flutter_svg/svg.dart';
import 'package:mollet/model/services/Product_service.dart';
import 'package:mollet/model/notifiers/cart_notifier.dart';
// import 'package:mollet/screens/tab_screens/cart1.dart';
import 'package:mollet/screens/tab_screens/history.dart';
import 'package:mollet/screens/tab_screens/home.dart';
import 'package:mollet/screens/tab_screens/homeScreen_pages/cart2.dart';
Expand Down Expand Up @@ -110,12 +109,19 @@ class _TabsLayoutState extends State<TabsLayout> {
),
),
GestureDetector(
onTap: () {
Navigator.of(context).push(
onTap: () async {
CartNotifier cartNotifier =
Provider.of<CartNotifier>(context, listen: false);
var navigationResult = await Navigator.of(context).push(
MaterialPageRoute(
builder: (context) => Cart1(),
),
);
if (navigationResult == true) {
setState(() {
getCart(cartNotifier);
});
}
},
child: Container(
padding: const EdgeInsets.only(left: 10.0),
Expand Down

0 comments on commit 394f7c6

Please sign in to comment.