Files
rasadyar_application/packages/chicken/lib/presentation/pages/role/logic.dart
2025-09-06 14:50:02 +03:30

29 lines
626 B
Dart

import 'package:rasadyar_core/core.dart';
class RoleLogic extends GetxController {
TokenStorageService tokenService = Get.find<TokenStorageService>();
GService gService = Get.find<GService>();
RxList<String> roles = <String>[].obs;
@override
void onInit() {
super.onInit();
List<String> items = tokenService.getUserLocal(Module.chicken)!.roles ?? [];
if (items.isNotEmpty ?? false) {
roles.assignAll(items);
}
}
@override
void onReady() {
// TODO: implement onReady
super.onReady();
}
@override
void onClose() {
// TODO: implement onClose
super.onClose();
}
}