invalidate method

Future<void> invalidate()

Invalidates the provider and completes all active calls with an error.

After invalidation, no additional messages are sent to callbacks.

The provider must be invalidated before it is deallocated.

Implementation

Future<void> invalidate() async {
  try {
    String method = 'invalidate';
    await _methodChannel.invokeMethod('$_PROVIDER.$method');
    _FCXLog._i(runtimeType, method);
  } on PlatformException catch (e) {
    var exception = FCXException(e.code, e.message);
    _FCXLog._e(runtimeType, exception);
    throw exception;
  }
}