init static method

Future<VWO?> init(
  1. VWOInitOptions options
)

Initializes the VWO SDK.

Returns a VWO instance on success, or null if an error occurs.

Implementation

static Future<VWO?> init(VWOInitOptions options) async {
  final vwo = VWO();
  try {
    await vwo.attach(options);
    return vwo;
  } catch (e) {
    logMessage('VWO: Error: ${e is PlatformException ? (e.message ?? '') : e}');
    return null;
  }
}