destroy method

Future<void> destroy()

Destroy the model and free resources

Implementation

Future<void> destroy() async {
  try {
    await _channel.invokeMethod('destroy', {'wrapperId': _wrapperId});
    _wrapperId = null;
  } on PlatformException catch (e) {
    throw Exception('Failed to destroy: ${e.message}');
  }
}