feat(order info): added order info screen

This commit is contained in:
Username1548
2025-04-04 20:21:31 +07:00
parent 9715f4cac9
commit 748484cf8f
387 changed files with 16171 additions and 18199 deletions

View File

@@ -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("Вы уверены что хотите выйти из аккаунта?"),
),
);
};
}