How to run Flutter legacy library? - flutter

Flutter_Blue 0.8.0 Its library is not compatible with the version of Flutter I am using.
https://pub.dev/packages/flutter_blue/versions/0.7.3 How do I install this ? Pub dont work. Or why the Flutter_Blue package is not working for me. flutter_bluetooth_serial okey

If you want to use a lower version of the package, you can lower the SDK version.
Flutter 1.x version https://docs.flutter.dev/development/tools/sdk/releases

Related

How to upgrade flutter project dart sdk version

I have Flutter version 3.3.2 installed.
How do I upgrade flutter project dart sdk version?
Current project sdk version
sdk:">=2.7.0 3.0.0<"
You can run flutter upgrade and normally your project should pick up the most recent version of the SDK.
Refer to the documentation and to this previously asked question.

Can I upgrade or downgrade flutter sdk to a specific version?

I'm trying to change from v2.10.1 to v2.10.2. And can it be changed by path or maybe others?
To upgrade to 2.10.2, you can simply run
flutter version v2.10.2
and to downgrade:
flutter downgrade
flutter downgrade only works if you have installed previous version from the same channel. if not, you can run
flutter downgrade v2.10.1
UPDATE
seems like flutter version has been depreciated. You could use fvm to easily switch between different versions

How to downgrade dart back to dart 1.x in Flutter?

I accidentally upgraded dart and flutter to the newest version but my code don't support null safety yet. Now I want to downgrade back to dart 1.x.
I tried flutter downgrade v1.2.1 but nothing changed. How can I downgrade back to dart 1.x?
You can downgrade flutter version by following below sequence.
type 'flutter downgrade 1.22.6'
Just type and command.
'flutter verion'
After 1,2 steps, you can see downgrading processing.
there is a tool that helps to manage different versions of flutter FVM
or you can use
flutter downgrade <version> (example: flutter downgrade v1.2.1)
If you want to downgrade flutter one the way which I use is to download the required SDK, unzip the folder and replace the existing flutter folder with the downloaded one.
Then restart the editor and you will the version you wanted.
Here are links for the Flutter SDK Release:
Windows
https://flutter.dev/docs/development/tools/sdk/releases
MacOS
https://flutter.dev/docs/development/tools/sdk/releases?tab=macos

How to update Dart SDK in ubuntu without updating Flutter?

So I am working on creating an e-commerce App in flutter. I am using flutter version 1.22.6 for Ubuntu (18.04.5 LTS). I don't want to upgrade my flutter version as it generated lots of issues to my colleagues. For me the problem is that i have to use a lot of packages for my Application which requires most recent Dart SDK. So is it possible to upgrade just the Dart SDK while keeping the same version of Flutter.
Probably not,
The reason for this is flutter is the framework and of course, it depends on dart language version. Why?
For example, If we compare 2 dart sdk between flutter 1.x version and flutter 2, we can see flutter ver 2 depends on dart sdk which supports null safety while flutter ver 1.x does not support null safety.
In the end, if you upgrade somehow the dart sdk without upgrading flutter sdk too, you will see many errors in flutter framework.

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?
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