feat : new ui and fix bug's
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:rasadyar_chicken/data/models/request/conform_allocation/conform_allocation.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/allocated_made/allocated_made.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/guild/guild_model.dart';
|
||||
@@ -17,7 +18,7 @@ class SaleLogic extends GetxController {
|
||||
StewardRootLogic rootLogic = Get.find<StewardRootLogic>();
|
||||
|
||||
List<String> routesName = ['فروش'];
|
||||
|
||||
DateTime? _lastBackPressed;
|
||||
|
||||
@override
|
||||
void onReady() {
|
||||
@@ -114,4 +115,23 @@ class SaleLogic extends GetxController {
|
||||
rootLogic.inventoryExpandedList.clear();
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
|
||||
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();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,7 +3,6 @@ import 'package:rasadyar_chicken/chicken.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/steward_free_bar_dashboard/steward_free_bar_dashboard.dart';
|
||||
import 'package:rasadyar_chicken/presentation/utils/nested_keys_utils.dart';
|
||||
import 'package:rasadyar_chicken/presentation/widget/base_page/view.dart';
|
||||
import 'package:rasadyar_chicken/presentation/widget/sale_buy_card_item.dart';
|
||||
import 'package:rasadyar_core/core.dart';
|
||||
|
||||
import 'logic.dart';
|
||||
@@ -21,7 +20,6 @@ class SalePage extends GetView<SaleLogic> {
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
spacing: 21,
|
||||
children: [
|
||||
|
||||
GlassMorphismCardIcon(
|
||||
title: 'فروش داخل استان',
|
||||
vecIcon: Assets.vec.map2Svg.path,
|
||||
|
||||
Reference in New Issue
Block a user