How to check what version of flutter sdk xcode is using? - flutter

I have several versions of the flutter sdk installed on my machine, each has an alias. I'm not sure what version xcode is using when building the app, how can I check it?
UPDATE:
I found a solution, information about flutter sdk which is used to build the version via xcode you can find in ios/Flutter/Generated.xcconfig. From here you can change the specific sdk path in FLUTTER_ROOT.

Related

Error: The 'super-parameters' language feature is disabled for this library

C:/src/flutter/packages/flutter/lib/src/material/elevated_button.dart:67:14: Error: The 'super-parameters' language feature is disabled for this library.
Try removing the package language version or setting the language version to 2.17 or higher.
[enter image description here](https://i.stack.imgur.com/VM10I.png)
I suspect that the problem appeared after Android Studio updated to Dolphin version
There's something weird going on here. You've likely got two versions of the Dart SDK installed (a >= 2.17 SDK through Flutter, one < 2.17 standalone) with the older version on your PATH. The Flutter SDK ships with its own Dart SDK and should only be using language features that are supported by the SDK shipped with it, so you should never seen this error normally.
Make sure you don't have two SDKs installed, or at least make sure that the SDK that's shipped with Flutter is first on your path.

How to downgrade flutter from version 2.5.3 to 1.22.6

I have some older projects built on flutter 1.22.6 and now I am working on latest version of flutter but there often comes need when I've to work on previous projects non null safety one's so when I try to downgrade flutter by giving command flutter downgrade 1.22.6 it tells me to downgrade to 2.5.2 and if I try to switch channel and then downgrade it downgrades to 2.5.2 first and then tells there is no version related to 1.22.6. This method used to be working before but now its not working anymore. I don't want to download zip files and then replace again flutter every-time I just want it to be done by cli.
My OS is windows 11
You can use flutter Version Manager fvm its specifically made to control flutter versions plus along with that you can install flutter sidekick as well. I am attaching link for you.
FVM Flutter Sidekick
Since you can no longer downgrade flutter versions, I have found the best way to do this is:
Download desired flutter version
Locate current 'flutter' folder and replace it with the desired version
if you run --flutter version after, it should show the correct version

Is it possible to get flutter SDK version during application runtime?

I'm using fvm, so multiple flutter SDK versions are installed and I want to be able to get, if possible, flutter SDK version during application runtime to verify that correct version was used during build, for example, when I compile manually in Xcode.

Flutter version used in project

Where can I see the flutter version used in a flutter project? Is there a file inside the project directory where I can see it? I think it is not specified inside the pubscpec.yaml file
So far, I think the specific version can not be found but only what versions can be used in a project. It can be found at the bottom part of pubscpec.lock file
pubspec.lock screenshot
It will not show version project wise. It will overall flutter version that you have installed in your system. For that:
Open your flutter project root directory in Command Prompt or Terminal type:
flutter --version command.
After typing the above command hit enter and You’ll see it will display us the currently installed flutter and Dart version in your computer and also tells us which version type we have installed like Stable or Beta.
Note: There is no such feature/command to check about which version of flutter you have used in Specific project.
Check this thread it will give you more idea:
https://github.com/flutter/flutter/issues/14230
All projects you run will use the flutter sdk installed in your machine/computer from where you specified its location from. So if the version the project uses don't match with the version you've and they conflict, you will have errors and if there is a huge gap and breaking changes, you'll need to either upgrade or downgrade the sdk. But most of the time, things are deprecated before they just become breaking changes and so you shouldn't have big issues. So the best thing to do is usually to upgrade. First check your sdk version via flutter --version. If its outdated, use flutter upgrade to upgrade it.
You can either run flutter --version to check flutter version installed on your machine or check it in your pubspec.lock file for current flutter version in your project
sdks:
dart: ">=2.10.0-110 <2.11.0"
flutter: ">=1.16.0 <2.0.0"

How to create a new Flutter project that targets Android KitKat and Android SDK 19? Which Flutter version should I use?

I need to use a native Android library that uses SDK 19, so I need to create a new Flutter project that supports SDK 19 and Android KitKat. But I don't know which Flutter version I should change to for best support for SDK 19 and Android KitKat. I have checked the Flutter release documentation but I can't for the life of me find the appropriate Flutter version to use.
In case you wonder why I have to use such an old SDK version, is that I am using a Zebra SDK for one of their scanner devices and that's the version they currently have available and they recommend creating a project specifically for SDK 19 and KitKat.
Thanks!