sendLog static method

Future<LogResponse> sendLog(
  1. LogOptions options
)

Send a log entry to the server

Implementation

static Future<LogResponse> sendLog(LogOptions options) async {
  try {
    final result = await _channel.invokeMethod('sendLog', options.toMap());
    print("Received log response: ${result}");
    return LogResponse.fromJsonString(result as String);
  } on PlatformException catch (e) {
    print("PlatformException during sendLog: ${e}");
    return LogResponse(
      success: false,
      error: "Failed to send log: ${e.message}",
    );
  }
}