WebBluetoothRemoteGATTService.fromJSObject constructor
WebBluetoothRemoteGATTService.fromJSObject(
- Object _jsObject,
- WebBluetoothDevice device
Create a new instance from a js object.
This should only be done by the library or if you're testing.
To get an instance use NativeBluetoothRemoteGATTServer.getPrimaryService, NativeBluetoothRemoteGATTServer.getPrimaryServices, WebBluetoothRemoteGATTService.getIncludedService, and ignore: deprecated_member_use_from_same_package WebBluetoothRemoteGATTService.getIncludedServices.
Implementation
WebBluetoothRemoteGATTService.fromJSObject(this._jsObject, this.device) {
if (!_JSUtil.hasProperty(_jsObject, "uuid")) {
throw UnsupportedError("JSObject does not have uuid");
}
if (!_JSUtil.hasProperty(_jsObject, "getCharacteristic")) {
throw UnsupportedError("JSObject does not have getCharacteristic");
}
}