destroyEventCallback static method Null safety

Future<void> destroyEventCallback()

销毁事件回调。

适用版本: >= 2.1.0

Implementation

static Future<void> destroyEventCallback() async {
  await _channel.invokeMethod('destroyEventCallback');

  _onEffectsError = null;
  _onEffectsFaceDetected = null;

  _streamSubscription?.cancel().then((_) {
    _streamSubscription = null;
  }).catchError((error) {
    PlatformException exception = error;
    print(exception);
  });
}