createInstanceWithConfig method

  1. @override
Future<void> createInstanceWithConfig(
  1. CmpConfig config
)
override

Creates an instance of CMP with the specified configuration.

Implementation

@override
Future<void> createInstanceWithConfig(CmpConfig config) async {
  try {
    await methodChannel.invokeMethod(
        'createInstanceWithConfig', config.toMap());
  } catch (e) {
    if (kDebugMode) {
      print('Error creating instance with config: ${e.toString()}');
    }
    rethrow;
  }
}