sendLog static method
Send a log entry to the server
Implementation
static Future<LogResponse> sendLog(LogOptions options) async {
try {
final result = await _channel.invokeMethod('sendLog', options.toMap());
if (kDebugMode) {
debugPrint(
"Smart Grow Logs ✉️: Received log response: $result",
);
}
return LogResponse.fromJsonString(result as String);
} on PlatformException catch (e) {
if (kDebugMode) {
debugPrint(
"Smart Grow Logs ✉️: PlatformException during sendLog: ${e.message}",
);
}
return LogResponse(
success: false,
error: "Failed to send log: ${e.message}",
);
}
}