79 lines
1.8 KiB
Dart
79 lines
1.8 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:rasadyar_core/core.dart';
|
|
|
|
class ActionLogic extends GetxController with GetTickerProviderStateMixin {
|
|
late Rx<SlidableController> slidController;
|
|
bool showSlideHint = true;
|
|
|
|
RxInt selectedIndex = 0.obs;
|
|
RxInt previousIndex = 0.obs;
|
|
|
|
List<String> headersTitle = [
|
|
'کاربران',
|
|
'سوابق بازرسی من',
|
|
'آمار',
|
|
'خروج از سامانه',
|
|
];
|
|
|
|
List<Widget> headersIcons = [
|
|
Assets.vec.profileUserSvg.svg(),
|
|
Assets.vec.calendarSearchSvg.svg(),
|
|
Assets.vec.diagramSvg.svg(),
|
|
Assets.vec.logoutSvg.svg(),
|
|
];
|
|
|
|
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
|
|
void onReady() {
|
|
// TODO: implement onReady
|
|
super.onReady();
|
|
}
|
|
|
|
@override
|
|
void onClose() {
|
|
// TODO: implement onClose
|
|
super.onClose();
|
|
}
|
|
|
|
Future<void> triggerSlidableAnimation() async {
|
|
await Future.delayed(Duration(milliseconds: 200));
|
|
await slidController.value.openEndActionPane();
|
|
await Future.delayed(Duration(milliseconds: 200));
|
|
await slidController.value.close();
|
|
showSlideHint = !showSlideHint;
|
|
}
|
|
|
|
void updateSelectedIndex(int index) {
|
|
if (index == selectedIndex.value) {
|
|
return;
|
|
}
|
|
previousIndex.value = selectedIndex.value;
|
|
selectedIndex.value = index;
|
|
}
|
|
}
|