start method

Future<bool> start()

Initialize the SDK.

This should be called before using the SDK to evaluate flags. Note that the SDK requires the flutter bindings to allow use of native plugins for handling device state and storage. In order to start the SDK before runApp is called, you must ensure the binding is initialized with WidgetsFlutterBinding.ensureInitialized.

The start function can take an indeterminate amount of time to complete. For instance if the SDK is started while a device is in airplane mode, then it may not complete until some time in the future when the device leaves airplane mode. For this reason it is recommended to use a timeout when waiting for SDK initialization.

For example:

await client.start().timeout(const Duration(seconds: 30));

Implementation

Future<bool> start() async {
  return _client.start();
}