feat : profile and history action supervision
This commit is contained in:
@@ -1,27 +1,31 @@
|
||||
import 'package:get/get.dart';
|
||||
import 'package:rasadyar_core/presentation/common/assets.dart';
|
||||
import 'package:rasadyar_core/core.dart';
|
||||
|
||||
class ActionLogic extends GetxController {
|
||||
class ActionLogic extends GetxController with GetTickerProviderStateMixin {
|
||||
late Rx<SlidableController> slidController;
|
||||
bool showSlideHint = true;
|
||||
RxBool isExpanded = false.obs;
|
||||
RxInt selectedIndex = 0.obs;
|
||||
|
||||
List<String> headersTitle = [
|
||||
'کاربران',
|
||||
'سوابق بازرسی من',
|
||||
'آمار',
|
||||
'خروج از سامانه'
|
||||
|
||||
'خروج از سامانه',
|
||||
];
|
||||
|
||||
|
||||
List<String> headersIcons = [
|
||||
Assets.vecProfileUserSvg,
|
||||
Assets.vecCalendarSearchSvg,
|
||||
Assets.vecDiagramSvg,
|
||||
Assets.vecLogoutSvg,
|
||||
|
||||
|
||||
];
|
||||
|
||||
@override
|
||||
void onInit() {
|
||||
super.onInit();
|
||||
slidController = SlidableController(this).obs;
|
||||
}
|
||||
|
||||
@override
|
||||
void onReady() {
|
||||
// TODO: implement onReady
|
||||
@@ -33,4 +37,14 @@ class ActionLogic extends GetxController {
|
||||
// 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;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user