removeFromBlackList method
Future<Response?>
removeFromBlackList({
- required String username,
- GeneralCallback<
Response> ? callback,
Implementation
Future<Response<dynamic>?> removeFromBlackList({
required String username,
GeneralCallback<Response<dynamic>>? callback,
}) async {
try {
final Response<dynamic> response = await dio.delete(
'/ban/',
data: <String, String>{
'username': username,
},
);
if (callback != null) {
callback.onSuccess(response);
}
return response;
} on DioException catch (dioException) {
if (callback == null) {
rethrow;
} else {
handleCrudError(dioException, callback);
}
}
return null;
}