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

Unable to run example app #28

Closed santhoshraje closed 4 years ago

santhoshraje commented 4 years ago

I have installed the plugin as specified on a new project on Android Studio and copied over the example app to my main.dart. Unfortunately I am getting the error below:

The name BluetoothState isn't a type so it cant be used as a type argument

at these lines:

final StreamController<BluetoothState> streamController = StreamController(); StreamSubscription<BluetoothState> _streamBluetooth;

alann-maulana commented 4 years ago

Hi @santhoshraje

I'm using this library on my daily project, didn't found any issue regarding BluetoothState. Can you please send me your example project, so I can help you with it.

Thanks.

guiassemany commented 4 years ago

Same here!

I just created a new flutter project, added this dependency and If I try to run the example it, it shows the same error.

santhoshraje commented 4 years ago

@guiassemany I think I did the same thing as you. I created a new flutter project, installed the dependencies and copied the code from the example main.dart to my own main.dart and got errors.

But when I download the zip file and run the provided example application, it works flawlessly. I am currently developing using the example application that was provided.

@alann-maulana unfortunately I deleted the example project, but it was basically just a new project with the dependencies and the code from main.dart.

alann-maulana commented 4 years ago

Sorry, within master branch I do a lot of improvements and some breaking changes that doesn't publish it yet to the pub server. Can you change you dependencies if this is work for you?

dependencies:
    flutter_beacon:
        git: https://github.com/alann-maulana/flutter_beacon

I'm also just re-run this example project at my S10+ and this is working like a charm. I'll try also on my iPhone 6 later.