stop method

  1. @override
Future<void> stop({
  1. Duration gracePeriod = const Duration(seconds: 5),
})
override

Stops the local proxy and disconnects the tunnel, if either is running.

Implementation

@override
Future<void> stop({Duration gracePeriod = const Duration(seconds: 5)}) async {
  try {
    await methodChannel.invokeMethod<void>('stop', {
      'timeoutSeconds': _wholeSecondsRoundedUp(gracePeriod),
    });
  } on PlatformException catch (e) {
    throw _mapException(e);
  }
}