mirror of
https://github.com/SyncrowIOT/syncrow-app.git
synced 2025-12-02 02:04:57 +00:00
Refactor HomeCubit class for better instance management
Create a private static instance variable and refactor methods for better instance management in the HomeCubit class.
This commit is contained in:
@ -22,8 +22,8 @@ part 'devices_state.dart';
|
||||
|
||||
class DevicesCubit extends Cubit<DevicesState> {
|
||||
DevicesCubit() : super(DevicesInitial()) {
|
||||
if (HomeCubit.selectedSpace != null) {
|
||||
fetchGroups(HomeCubit.selectedSpace!.id!);
|
||||
if (HomeCubit.getInstance().selectedSpace != null) {
|
||||
fetchGroups(HomeCubit.getInstance().selectedSpace!.id!);
|
||||
}
|
||||
}
|
||||
bool _isClosed = false;
|
||||
|
||||
Reference in New Issue
Block a user