initialize static method

Future<void> initialize({
  1. required String apiKey,
  2. required String baseUrl,
  3. bool debug = false,
})

Initialize the Smart Grow Logs SDK

Implementation

static Future<void> initialize({
  required String apiKey,
  required String baseUrl,
  bool debug = false,
}) async {
  try {
    await _channel.invokeMethod('initialize', {
      'apiKey': apiKey,
      'baseUrl': baseUrl,
      'debug': debug,
    });
  } on PlatformException catch (e) {
    print("PlatformException during initialization: ${e.message}");
    throw Exception("Failed to initialize SmartGrowLogs: ${e.message}");
  }
}