feat : new ui and fix bug's

This commit is contained in:
2025-10-06 10:57:46 +03:30
parent a4c7fa87a3
commit 887aff27ae
44 changed files with 842 additions and 206 deletions

View File

@@ -1,8 +1,9 @@
import 'package:flutter/services.dart';
import 'package:rasadyar_core/core.dart';
class BuyLogic extends GetxController {
List<String> routesName = ['خرید'];
DateTime? _lastBackPressed;
@override
void onInit() {
@@ -11,7 +12,7 @@ class BuyLogic extends GetxController {
@override
void onReady() {
// TODO: implement onReady
fLog('BuyLogic onReady');
super.onReady();
}
@@ -20,4 +21,20 @@ class BuyLogic extends GetxController {
// TODO: implement onClose
super.onClose();
}
void onPopScopTaped() async {
final now = DateTime.now();
if (_lastBackPressed == null || now.difference(_lastBackPressed!) > Duration(seconds: 2)) {
_lastBackPressed = now;
Get.snackbar(
'خروج از برنامه',
'برای خروج دوباره بازگشت را بزنید',
snackPosition: SnackPosition.TOP,
duration: Duration(seconds: 2),
backgroundColor: AppColor.warning,
);
} else {
await SystemNavigator.pop();
}
}
}