close method

Future<void> close()

Implementation

Future<void> close() async {
  if (_sendPort == null) return;
  try {
    await _request<void>(const _Close());
  } finally {
    _isolate?.kill();
    _isolate = null;
    _sendPort = null;
  }
}