getAllOrganizations method
Get all organizations
Implementation
Future<List<Organization>> getAllOrganizations() async {
try {
final response = await dio.get(
"/organization/list",
options: await getOptions(isTokenRequired: true),
);
return response.data.map((e) => Organization.fromJson(e)).toList();
} catch (e) {
final message = getErrorMessage(e);
if (message == null) rethrow;
throw message;
}
}