leaveOrganization method
Leave an organization
organizationId
The ID of the organization to leave
Implementation
Future<void> leaveOrganization({required String organizationId}) async {
try {
await dio.post(
"/organization/leave-organization",
data: {"organizationId": organizationId},
options: await getOptions(isTokenRequired: true),
);
} catch (e) {
final message = getErrorMessage(e);
if (message == null) rethrow;
throw message;
}
}