initialize method

  1. @override
Future<void> initialize({
  1. required CustomerIOConfig config,
})
override

To initialize the plugin

Implementation

@override
Future<void> initialize({
  required CustomerIOConfig config,
}) async {
  try {
    config.version = version;
    if (!config.enableInApp && config.organizationId.isNotEmpty) {
      config.enableInApp = true;
    }
    await methodChannel.invokeMethod(MethodConsts.initialize, config.toMap());
  } on PlatformException catch (exception) {
    handleException(exception);
  }
}