import 'package:rasadyar_core/core.dart'; class RoleLogic extends GetxController { TokenStorageService tokenService = Get.find(); GService gService = Get.find(); RxList roles = [].obs; @override void onInit() { super.onInit(); List 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(); } }