clearAppLogs method
Future<(bool, UEmptyResponse?, String?)>
clearAppLogs({
- required VoidCallback? onOk,
- dynamic onError()?,
- dynamic onException(
- String e
Implementation
Future<(bool, UEmptyResponse?, String?)> clearAppLogs({
required VoidCallback? onOk,
Function(UEmptyResponse e)? onError,
Function(String e)? onException,
}) async {
(bool, UEmptyResponse?, String?) result = (false, null, null);
await UHttpClient.send(
method: "DELETE",
endpoint: "${U.baseUrl}/Log/Clear",
onSuccess: (Response r) {
result = (true, null, null);
onOk?.call();
},
onError: (Response r) {
final UEmptyResponse err = UEmptyResponse.fromJson(r.body);
result = (false, err, null);
onError?.call(err);
},
onException: (String e) {
result = (false, null, e);
onException?.call(e);
},
);
return result;
}