mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-08-25 15:39:41 +00:00
Refactor SpaceManagementPage's initState to ensure HTTPService is initialized before use in CommunitiesBloc.
This commit is contained in:
@ -31,12 +31,12 @@ class _SpaceManagementPageState extends State<SpaceManagementPage> {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
|
_httpService = HTTPService();
|
||||||
communitiesBloc = CommunitiesBloc(
|
communitiesBloc = CommunitiesBloc(
|
||||||
communitiesService: DebouncedCommunitiesService(
|
communitiesService: DebouncedCommunitiesService(
|
||||||
RemoteCommunitiesService(_httpService),
|
RemoteCommunitiesService(_httpService),
|
||||||
),
|
),
|
||||||
)..add(const LoadCommunities(LoadCommunitiesParam()));
|
)..add(const LoadCommunities(LoadCommunitiesParam()));
|
||||||
_httpService = HTTPService();
|
|
||||||
super.initState();
|
super.initState();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user