dart-gde / chrome.dart

Provide Dart interop with chrome.* APIs for Chrome Packaged Apps
Other
125 stars 48 forks source link

bluetoothLowEnergy.registerAdvertisement throws error #275

Open tonyclickspace opened 6 years ago

tonyclickspace commented 6 years ago

Dart 1.24.3, compiled with dart2js using --csp flag Running on ChromeOS:

import 'package:chrome/chrome_app.dart' as chrome;
void main() {
  chrome.Advertisement advertisement = new chrome.Advertisement(type: chrome.AdvertisementType.BROADCAST, serviceUuids: <String>['1234']);
  int id = await chrome.bluetoothLowEnergy.registerAdvertisement(advertisement); //error
}

Throws: Error: Invalid argument for property 1. Property 'serviceUuids': expected 'Array' got 'object'.