Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

type 'String' is not a subtype of type 'int' - Error thrown when Major set on iBeacon selection #10

Open
tristanwilson111 opened this issue Jun 26, 2018 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@tristanwilson111
Copy link

Hey there,

I've got my beacon detected with Generic UUID, Major and Minor settings in place. With iBeacon, it seems when I have any value (String, int, etc.) in the Major text area, this error is thrown. I am able to use iBeacon when Major is blank.

Stacktrace:

` ══╡ EXCEPTION CAUGHT BY GESTURE ╞═══════════════════════════════════════════════════════════════════
I/flutter (17107): The following assertion was thrown while handling a gesture:
I/flutter (17107): type 'String' is not a subtype of type 'int'

When the exception was thrown, this was the stack:
I/flutter (17107): #0 new BeaconRegionIBeacon.from (file:///D:/Projects/flutter_beacons/beacons/lib/data/beacon_region.dart)
I/flutter (17107): #1 _HeaderState._onTapSubmit (file:///D:/Projects/flutter_beacons/beacons/example/lib/header.dart:84:40)
I/flutter (17107): #2 GestureRecognizer.invokeCallback (package:flutter/src/gestures/recognizer.dart:102:24)
I/flutter (17107): #3 TapGestureRecognizer._checkUp (package:flutter/src/gestures/tap.dart:161:9)
I/flutter (17107): #4 TapGestureRecognizer.handlePrimaryPointer (package:flutter/src/gestures/tap.dart:94:7)
I/flutter (17107): #5 PrimaryPointerGestureRecognizer.handleEvent (package:flutter/src/gestures/recognizer.dart:315:9)
I/flutter (17107): #6 PointerRouter._dispatch (package:flutter/src/gestures/pointer_router.dart:73:12)
I/flutter (17107): #7 PointerRouter.route (package:flutter/src/gestures/pointer_router.dart:101:11)
I/flutter (17107): #8 _WidgetsFlutterBinding&BindingBase&GestureBinding.handleEvent (package:flutter/src/gestures/binding.dart:143:19)
I/flutter (17107): #9 _WidgetsFlutterBinding&BindingBase&GestureBinding.dispatchEvent (package:flutter/src/gestures/binding.dart:121:22)
I/flutter (17107): #10 _WidgetsFlutterBinding&BindingBase&GestureBinding._handlePointerEvent (package:flutter/src/gestures/binding.dart:101:7)
I/flutter (17107): #11 _WidgetsFlutterBinding&BindingBase&GestureBinding._flushPointerEventQueue (package:flutter/src/gestures/binding.dart:64:7)
I/flutter (17107): #12 _WidgetsFlutterBinding&BindingBase&GestureBinding._handlePointerDataPacket (package:flutter/src/gestures/binding.dart:48:7)
I/flutter (17107): #13 _invoke1 (dart:ui/hooks.dart:134:13)
I/flutter (17107): #14 _dispatchPointerDataPacket (dart:ui/hooks.dart:91:5)
I/flutter (17107):
I/flutter (17107): Handler: onTap
I/flutter (17107): Recognizer:
I/flutter (17107): TapGestureRecognizer#fc434(debugOwner: GestureDetector, state: possible, won arena, finalPosition:
I/flutter (17107): Offset(199.4, 276.3), sent tap down)
I/flutter (17107): ════════════════════════════════════════════════════════════════════════════════════════════════════`

I'm still learning both Flutter and Dart, and tried to see if there were any mismatched variables, but saw none. This is not an issue for me as I am able to work around it, just figured I would make an issue in case it's something needing fixed.

This error was produced on a Google Pixel running the Android P Beta.

@lukaspili
Copy link
Contributor

Can you show me code you're using to listen to iBeacons?
Thanks.

@tristanwilson111
Copy link
Author

Code being used is your example application.

@lukaspili lukaspili added the bug Something isn't working label Jun 26, 2018
@lukaspili lukaspili self-assigned this Jun 26, 2018
@vinceramcesoliveros
Copy link

vinceramcesoliveros commented Jul 24, 2018

What happens if you change the datatype to String? I am studying your plugin and will try to contribute.

EDIT: It works for me when I changed the Datatype of "int" to "String"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants