forked from eatvio/eatvio_app
feat(order info): added order info screen
This commit is contained in:
@@ -21,7 +21,7 @@ class MenuScreen extends StatelessWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(centerTitle: false, title: Text('Меню')),
|
||||
appBar: AppBar(centerTitle: false, title: const Text('Меню')),
|
||||
body: SingleChildScrollView(
|
||||
child: Column(
|
||||
children: [
|
||||
@@ -78,7 +78,7 @@ class MenuScreen extends StatelessWidget {
|
||||
onTap: onTap,
|
||||
leading: SvgPicture.asset(leading, height: 24, width: 24, colorFilter: ColorFilter.mode(appTheme.blueA400, BlendMode.srcIn)),
|
||||
title: Text(title),
|
||||
trailing: Icon(Icons.arrow_forward_ios_rounded, size: 12, color: Colors.black38),
|
||||
trailing: const Icon(Icons.arrow_forward_ios_rounded, size: 12, color: Colors.black38),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -94,32 +94,32 @@ class MenuScreen extends StatelessWidget {
|
||||
return () async {
|
||||
showDialog(
|
||||
context: context,
|
||||
builder:
|
||||
(context) => CupertinoAlertDialog(
|
||||
title: Text("Выход"),
|
||||
actions: [
|
||||
CupertinoDialogAction(
|
||||
onPressed: () async {
|
||||
try {
|
||||
await sl<Dio>().post(baseUrl + '/api/profile/logout');
|
||||
} catch (e) {
|
||||
} finally {
|
||||
await TokenStorage.removeTokenInStorage();
|
||||
GoRouter.of(context).go('/auth-screen', extra: true);
|
||||
}
|
||||
},
|
||||
child: Text("Выйти"),
|
||||
isDestructiveAction: true,
|
||||
),
|
||||
CupertinoDialogAction(
|
||||
onPressed: () {
|
||||
Navigator.of(context).pop();
|
||||
},
|
||||
child: Text("Отмена"),
|
||||
),
|
||||
],
|
||||
content: Text("Вы уверены что хотите выйти из аккаунта?"),
|
||||
builder: (context) => CupertinoAlertDialog(
|
||||
title: const Text("Выход"),
|
||||
actions: [
|
||||
CupertinoDialogAction(
|
||||
onPressed: () async {
|
||||
try {
|
||||
await sl<Dio>().post('$baseUrl/api/profile/logout');
|
||||
} finally {
|
||||
await TokenStorage.removeTokenInStorage();
|
||||
if (context.mounted) {
|
||||
GoRouter.of(context).go('/auth-screen', extra: true);
|
||||
}
|
||||
}
|
||||
},
|
||||
isDestructiveAction: true,
|
||||
child: const Text("Выйти"),
|
||||
),
|
||||
CupertinoDialogAction(
|
||||
onPressed: () {
|
||||
Navigator.of(context).pop();
|
||||
},
|
||||
child: const Text("Отмена"),
|
||||
),
|
||||
],
|
||||
content: const Text("Вы уверены что хотите выйти из аккаунта?"),
|
||||
),
|
||||
);
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user