michaellee8 / flutter_blue_beacon

A Flutter library that implements iBeacon and Eddystone scanning on top of flutter_blue.
https://pub.dartlang.org/packages/flutter_blue_beacon
MIT License
17 stars 12 forks source link

How to get 'Major' value #3

Closed Calou07 closed 5 years ago

Calou07 commented 5 years ago

Hello, I am trying to get the Major value to use it in another function, but I don't manage to do it.

Can someone help me please ?

michaellee8 commented 5 years ago

You mean beacon.major?

Calou07 commented 5 years ago

Yes, I tried : print('major: ${IBeacon().major}'); but it returns "null" which means i don't have the scaned value.

michaellee8 commented 5 years ago

IBeacon class is just an container of Beacon results, the scanning logic is not there, pls follow the examples in https://github.com/michaellee8/flutter_blue_beacon/blob/master/example/lib/main.dart

Calou07 commented 5 years ago

I use the exact same code and I can see the true value in the app, it works fine.

My problem is that i can't put its value in a variable so i can une it elsewhere on the programe.

michaellee8 commented 5 years ago

I cannot understand what are you talking about, can you provide some example code that reflect the problem?

Calou07 commented 5 years ago

It's Okay, I solved my problem. Thank you for responding me and for your work.