mirror of
https://github.com/SyncrowIOT/syncrow-app.git
synced 2025-11-27 01:34:55 +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:
@ -37,9 +37,10 @@ class AppBody extends StatelessWidget {
|
||||
}
|
||||
},
|
||||
builder: (context, state) {
|
||||
return state is! GetSpacesLoading ||
|
||||
state is! GetSpaceRoomsLoading
|
||||
? HomeCubit.get(context).pages[HomeCubit.pageIndex]
|
||||
return state is! GetSpacesLoading
|
||||
? state is! GetSpaceRoomsLoading
|
||||
? HomeCubit.getInstance().pages[HomeCubit.pageIndex]
|
||||
: const Center(child: CircularProgressIndicator())
|
||||
: const Center(child: CircularProgressIndicator());
|
||||
},
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user