forget method
Forget the device. This means that the device will be forgotten by the browser and no longer shows up in Bluetooth.getDevices.
Once forget has been called you won't be able to communicate with the device anymore.
May throw:
- NativeAPINotImplementedError if the user agent doesn't have the forget method. Use hasForget to mitigate this.
NOTE: Calling forget on a device retrieved via Bluetooth.requestLEScan will cause chrome to crash (last tested on 2022-12-23).
NOTE: Forgetting a device twice will cause chrome to crash (last tested on 2022-12-23).
See:
Implementation
Future<void> forget() async {
if (!hasForget) {
throw NativeAPINotImplementedError("forget");
}
await _forget().toDart;
}