Files
rasadyar_application/packages/chicken/lib/features/common/role/logic.dart

19 lines
443 B
Dart
Raw Normal View History

2025-09-02 15:59:49 +03:30
import 'package:rasadyar_core/core.dart';
class RoleLogic extends GetxController {
2025-09-06 14:50:02 +03:30
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) {
2025-09-06 14:50:02 +03:30
roles.assignAll(items);
}
}
2025-09-02 15:59:49 +03:30
}