close method

  1. @override
Future<void> close()
override

Implementation

@override
Future<void> close() async {
  Phidget.unregisterInstance(identityHashCode(this));

  if (_handle != null) {
    try {
      bindings.phidgetClose(_handle!);
    } catch (_) {}
    _handle = null;
  }

  if (isAttached) {
    internalProcessDetach();
  }
  isAttached = false;
}