alann-maulana / flutter_beacon

An hybrid iBeacon scanner and transmitter SDK for Flutter Android and iOS.
Apache License 2.0
117 stars 144 forks source link

Unhandled Exception: type 'int' is not a subtype of type 'bool' #41

Closed Lohann closed 4 years ago

Lohann commented 4 years ago

Hi, I'm getting this error message when starting the example application.

My Device:

The example application didn't find the beacon, I'm migrating my native application to flutter, so I know the beacon is working properly.

flutter: Listening to bluetooth state
flutter: AppLifecycleState = AppLifecycleState.resumed
flutter: AppLifecycleState = AppLifecycleState.resumed
flutter: BluetoothState = Instance of 'BluetoothState'
[VERBOSE-2:ui_dart_state.cc(157)] Unhandled Exception: type 'int' is not a subtype of type 'bool'
#0      MethodChannel.invokeMethod (package:flutter/src/services/platform_channel.dart:321:13)
<asynchronous suspension>
#1      FlutterBeacon.initializeScanning (package:flutter_beacon/flutter_beacon.dart:65:33)
#2      _MyAppState.initScanBeacon (package:flutter_app/beacon.dart:75:25)
#3      _MyAppState.listeningState.<anonymous closure> (package:flutter_app/beacon.dart:47:11)
#4      _rootRunUnary (dart:async/zone.dart:1134:38)
#5      _CustomZone.runUnary (dart:async/zone.dart:1031:19)
#6      _CustomZone.runUnaryGuarded (dart:async/zone.dart:933:7)
#7      _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:338:11)
#8      _BufferingStreamSubscription._add (dart:async/stream_impl.dart:265:7)
#9      _ForwardingStreamSubscription._add (dart:async/stream_pipe.dart:134:11)
#10     _MapStream._handleData (dart:async/stream_pipe.dart:234:10)
#11     _ForwardingStreamSubscription._handleData (dart:async/stream_pipe.dart:166:13)
#12     _rootRunUnary (dart:async/zone.dart:1134:38)
#13     _CustomZone.runUnary (dart:async/zone.dart:1031:19)
#14     _CustomZone.runUnaryGuarded (dart:async/zone.dart:933:7)
#15     _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:338:11)
#16     _DelayedData.perform (dart:async/stream_impl.dart:593:14)
#17     _StreamImplEvents.handleNext (dart:async/stream_impl.dart:709:11)
#18     _PendingEvents.schedule.<anonymous closure> (dart:async/stream_impl.dart:669:7)
#19     _rootRun (dart:async/zone.dart:1122:38)
#20     _CustomZone.run (dart:async/zone.dart:1023:19)
#21     _CustomZone.runGuarded (dart:async/zone.dart:925:7)
#22     _CustomZone.bindCallbackGuarded.<anonymous closure> (dart:async/zone.dart:965:23)
#23     _rootRun (dart:async/zone.dart:1126:13)
#24     _CustomZone.run (dart:async/zone.dart:1023:19)
#25     _CustomZone.runGuarded (dart:async/zone.dart:925:7)
#26     _CustomZone.bindCallbackGuarded.<anonymous closure> (dart:async/zone.dart:965:23)
#27     _microtaskLoop (dart:async/schedule_microtask.dart:43:21)
#28     _startMicrotaskLoop (dart:async/schedule_microtask.dart:52:5)
renoinn commented 4 years ago

fixed it. https://github.com/alann-maulana/flutter_beacon/pull/38

wait release or using from master branch.

flutter_beacon:
  git:
    url: git@github.com:alann-maulana/flutter_beacon.git
alann-maulana commented 4 years ago

Thanks @renoinn, closed it