teardown method

Future<void> teardown()

Implementation

Future<void> teardown() async {
  if (onTeardown != null) {
    await onTeardown!();
  }
  await _isolateEventStreamSubscription.cancel();
  await serviceConnection.dispose();
  process.kill();
}