action
 profile
This commit is contained in:
2025-04-21 15:45:15 +03:30
parent d4ebefedba
commit 0c750e1c01
36 changed files with 1082 additions and 207 deletions

View File

@@ -1,10 +1,12 @@
import 'package:rasadyar_core/core.dart';
import 'package:rasadyar_core/data/utils.dart';
class ActionLogic extends GetxController with GetTickerProviderStateMixin {
late Rx<SlidableController> slidController;
bool showSlideHint = true;
RxBool isExpanded = false.obs;
RxInt selectedIndex = 0.obs;
RxInt previousIndex = 0.obs;
List<String> headersTitle = [
'کاربران',
@@ -20,10 +22,31 @@ class ActionLogic extends GetxController with GetTickerProviderStateMixin {
Assets.vecLogoutSvg,
];
RxList<bool> supervisionHistoryList = [false, false, false, false].obs;
List<String> tmpLs = ['دولتی', 'غیر دولتی', 'استیجاری', 'شخصی', 'سایر'];
List<String> hamadanCities = [
'همدان',
'ملایر',
'نهاوند',
'تویسرکان',
'اسدآباد',
'بهار',
'رزن',
'کبودرآهنگ',
'فامنین',
'لالجین',
];
RxInt filter1Index = 0.obs;
RxInt filter2Index = 0.obs;
@override
void onInit() {
super.onInit();
slidController = SlidableController(this).obs;
}
@override
@@ -38,7 +61,6 @@ class ActionLogic extends GetxController with GetTickerProviderStateMixin {
super.onClose();
}
Future<void> triggerSlidableAnimation() async {
await Future.delayed(Duration(milliseconds: 200));
await slidController.value.openEndActionPane();
@@ -47,4 +69,12 @@ class ActionLogic extends GetxController with GetTickerProviderStateMixin {
showSlideHint = !showSlideHint;
}
void updateSelectedIndex(int index) {
if(index == selectedIndex.value) {
return;
}
previousIndex.value = selectedIndex.value;
selectedIndex.value = index;
}
}