initSync method

  1. @override
Future<void> initSync(
  1. String sdkKey,
  2. String datafile, {
  3. int periodicDownloadInterval = 10 * 60,
})
override

Initializes the Optimizely plugin synchronously.

This will initialize Optimizely with the local datafile to speed up initialization. The datafile parameter needs to be the JSON content of it!

Implementation

@override
Future<void> initSync(
  String sdkKey,
  String datafile, {
  int periodicDownloadInterval = 10 * 60,
}) async {
  await methodChannel.invokeMethod('initSync', <String, dynamic>{
    'sdk_key': sdkKey,
    'datafile': datafile,
    'periodic_download_interval': periodicDownloadInterval,
  });
}