Refactor SpaceManagementPage's initState to ensure HTTPService is initialized before use in CommunitiesBloc.

This commit is contained in:
Faris Armoush
2025-07-21 16:24:11 +03:00
parent ce65b068ff
commit 35c8a73156

View File

@ -31,12 +31,12 @@ class _SpaceManagementPageState extends State<SpaceManagementPage> {
@override
void initState() {
_httpService = HTTPService();
communitiesBloc = CommunitiesBloc(
communitiesService: DebouncedCommunitiesService(
RemoteCommunitiesService(_httpService),
),
)..add(const LoadCommunities(LoadCommunitiesParam()));
_httpService = HTTPService();
super.initState();
}