getCommunities method
Implementation
Future<void> getCommunities() async {
isLoading.value = true;
final response = await _dioApiService.get(
endpoint: CommunityConstants.communities,
headers: {'api-key': CommunityConstants.apiKey},
);
if (response.statusCode == 200) {
communityResponse.value = CommunityResponse.fromJson(response.data);
}
isLoading.value = false;
}