phev8
phev8

Reputation: 3773

Can't include flutter_blue into my Flutter project

I was trying to import flutter_blue into my project, generated by flutter create myapp, but I get an error message directly:

Because every version of flutter_test from sdk depends on convert 2.0.1 and flutter_blue 0.4.0 depends on convert ^2.0.2, flutter_test from sdk is incompatible with flutter_blue 0.4.0.
And because no versions of flutter_blue match >0.4.0 <0.5.0, flutter_test from sdk is incompatible with flutter_blue ^0.4.0. ...
pub get failed (1)

I'm using Flutter 0.5.1 (preview release 1).

Are there any workarounds to get it somehow running or any alternative libraries to use Bluetooth?

Upvotes: 0

Views: 783

Answers (1)

Dinesh Balasubramanian
Dinesh Balasubramanian

Reputation: 21728

WorkAround:

Instead of going with 0.4.0. Can you with previous release 0.3.3 which is not having this problem.

flutter_blue: ^0.3.3

Reason:

flutter_blue updated their dependency here which is not yet updated in flutter_test(which is using 2.0.1 of convert). So we have to downgrade flutter_blue to use with flutter/flutter_test

Upvotes: 1

Related Questions