logError method
log error
Implementation
void logError(Object e, StackTrace st) {
// if (!kReleaseMode) log('${e.toString()} ${st.toString()}');
ApiService().request(
method: ApiMethod.post,
endpoint: ApiEndpoints.logs,
body: {
ApiKeys.data: [
LogModel(
stack: st.toString(),
message: e.toString(),
level: LogLevel.error,
time: DateTime.now().millisecondsSinceEpoch,
).toMap(),
],
},
);
}