getUsers method
Retrieve all users
Implementation
Future<Response> getUsers({
int? limit,
String? cursor,
bool? includeRole,
String? projectId,
}) async {
try {
final response = await _dio.get(
'/users',
queryParameters: {
if (limit != null) 'limit': limit,
if (cursor != null) 'cursor': cursor,
if (includeRole != null) 'includeRole': includeRole,
if (projectId != null) 'projectId': projectId,
},
);
return response;
} on DioException catch (e) {
throw Exception('Failed to retrieve users: ${e.message}');
}
}