initialize static method

Future<void> initialize({
  1. required String appId,
  2. String channel = 'stable',
  3. String? baseUrl,
})

Initialize the SDK. Must be called before any other method.

Implementation

static Future<void> initialize({
  required String appId,
  String channel = 'stable',
  String? baseUrl,
}) async {
  _appId = appId;
  _channel = channel;
  if (baseUrl != null) _baseUrl = baseUrl;

  _packageInfo = await PackageInfo.fromPlatform();
  _deviceId = await _resolveDeviceId();
  _instance = FlutterOTA._();
}