start static method Null safety

Future<void> start(
  1. LDConfig config,
  2. LDContext context
)

Initialize the SDK with the given LDConfig and LDContext.

This should be called before any other SDK methods to initialize the native SDK instance. Note that the SDK requires the flutter bindings to be initialized to allow bridging communication. In order to start the SDK before runApp is called, you must ensure the binding is initialized with WidgetsFlutterBinding.ensureInitialized.

Implementation

static Future<void> start(LDConfig config, LDContext context) async {
  _channel.setMethodCallHandler(_handleCallbacks);
  await _channel.invokeMethod('start', {'config': config.toCodecValue(_sdkVersion), 'context': context.toCodecValue()});
}