addBlackList method
Implementation
Future<Response<dynamic>?> addBlackList({
required String username,
GeneralCallback<Response<dynamic>>? callback,
}) async {
try {
final Response<dynamic> response = await dio.put(
'/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;
}