getCommunity method

Future<void> getCommunity()

Implementation

Future<void> getCommunity() async {
  isLoading.value = true;
  final response = await _dioApiService.get(
    endpoint: CommunityConstants.community,
    headers: {'api-key': CommunityConstants.apiKey},
  );
  if (response.statusCode == 200) {
    community.value = Community.fromJson(response.data['data']);
  }
  isLoading.value = false;
}