how to run "melos bootstrap" command with fvm - flutter

Currently on my computer installed Flutter version 3.3, but my project works on 2.5.3
So I'm using fvm for that, I've set up everything, but when I run melos bootstrap, I think it's just running command "flutter pub get" instead of "fvm flutter pub get"
How to fix that?

You can customize the sdkPath so it uses your fvm config like so:
sdkPath: .fvm/flutter_sdk
Link to melos docs: https://melos.invertase.dev/configuration/overview#sdkpath

Related

FirebaseAppPlatform.verifyExtends error while running flutter test

When I run my bitbucket pipeline for my project im getting an error during flutter test:
/root/.pub-cache/hosted/pub.dartlang.org/firebase_core-1.24.0/lib/src/firebase_app.dart:18:25: Error: Member not found: 'FirebaseAppPlatform.verifyExtends'.
FirebaseAppPlatform.verifyExtends(_delegate);
^^^^^^^^^^^^^
When I run flutter test in my terminal I don't have these issues.
My pipeline script is:
Build Setup
flutter clean
flutter pub get
flutter pub run build_runner build
bash <(curl -s https://raw.githubusercontent.com/objectbox/objectbox-dart/main/install.sh)
flutter test
Because there are some breaking change of firebase_core_platform_interface that do not comply with semantic versioning:
https://github.com/firebase/flutterfire/issues/9806
You need to overwrite this library:
Root cause
You are update or installing only a subset of the Firebase plugins (firebase_core, firebase_analytics,...)
Solution
Solution 1: (preferred) Updating to the latest version with flutterfire update check the docs here. But it is not easily because your project will have a lot of packages dependencies to each other like flutter version 2 or 3, so on. Anyway, it is long term solution.
Solution 2: (Fix to run)
You can add to your pubspec.yaml
dependency_overrides:
firebase_core_platform_interface: 4.5.1
Solution 3: (Fix to run)
Update dependencies with this below command line:
flutter pub upgrade --major-versions
Finally, Run the project again by following stuffs:
flutter clean
flutter pub get
cd ios && rm -f Podfile.lock
cd ios && pod install --repo-update
flutter run
That's it!
Run "flutter pub upgrade --major-versions"
run this
flutter pub upgrade --major-versions
than run this
flutter upgrade
I changed my flutter version via flutter channel master. This changed automatically my pubspec.lock.
In my case, restoring previous version of pubspec.lock solved the problem (pug get needed).

can't install get_cli flutter

I want to install get_cli but when running the command below, error is found
flutter pub global activate get_cli
the error
Warning: Executable "get" runs "bin/get.dart", which was not found in get_cli.
Warning: Executable "getx" runs "bin/get.dart", which was not found in get_cli.
I have entered the path below to the environment
export PATH="$PATH":"$HOME/.pub-cache/bin"
You can downgrade to 1.6.0 with
dart pub global deactivate get_cli
dart pub global activate get_cli 1.6.
Ref Github Issue
Explanation of error occurred due to this reason=>
// to install get_cli 1.6.0 version for proper working instead of get_cli^1.7.1
//first of all deactivate get, getx version of 1.7.1 then install get_cli ^1.6.0
Do the steps
step=1>
flutter pub global deactivate get
Step=2>
flutter pub global deactivate gets
step=3>
dart pub global activate get_cli ^1.6.0
//this will surely help you if you follow these steps
it show essay
Get CLI
Install it
You can install the package from the command line:
dart pub global activate get_cli
ya
flutter pub global activate get_cli
if you use cmd to install getcli
if you install Get_Cli using cmd thenafter installtion in cmd you show
Pub installs executables into C:\Users\USERNAME\AppData\Local\Pub\Cache\bin
that path set system variables in PATH add new PATH veriable PATH
if you use other terminal then after installesion go your file maneger
C:\Users\USERNAME\AppData\Local\Pub\Cache\bin
go and check it after copy that path and create new system verible as normal.
dart pub global activate get_cli

Update Dart DevTools

I'm currently on flutter 1.22.4 with dart devtools on 0.9.3+4, but https://pub.dev/packages/devtools/install has it at 0.9.5. My current version doesn't have the response body in the network tab and I'm trying to update to a newer version and I don't know how to.
First, run flutter -doctor and see if there are any errors. Then try running "flutter pub get" if that doesn't do the trick upgrade your tools and run flutter -clean and try again.

Flutter - Flutter Version Management (fvm) package not working in windows

I just added the the fvm package to switch the flutter channel from stable to master without downloading sdk components every time when switching flutter channels.
I have followed the step written in readme.md for switching the channel.
I have set the following path in my environment variables.
D:\Program_Files\FlutterSDK\SDK\flutter\bin;
D:\Program_Files\FlutterSDK\SDK\dart-sdk\bin;
C:\Users\User\AppData\Roaming\Pub\Cache\bin;
Now, i have opened my first project in which i want to use "flutter SDK's master channel". But, whenever i try to use the command "fvm use master". It's not working.
It is giving me an error like,
'fvm' is not recognized as an internal or external command,
So, can anyone suggest a solution?
Thanks.
try :
pub global run fvm:main
pub global run fvm:main use VERSION
Hi adding in your path:
%LOCALAPPDATA%\Pub\Cache\bin
More info:
https://dart.dev/tools/pub/cmd/pub-global#running-a-script-from-your-path
In my case fvm commands did not work on Windows even tho I checked everything. It gave missing fvm.exe file and other errors. If you also stuck there you can use this way. Only way I managed to get it work is to use longer commands like these:
flutter pub global run fvm:main list
Seems like all fvm commands:
config Set configuration for FVM
flutter Proxies Flutter Commands
install Installs Flutter SDK Version
list Lists installed Flutter SDK Version
releases Lists Flutter SDK releases.
remove Removes Flutter SDK Version
use Which Flutter SDK Version you would like to use
version Prints the currently-installed version of FVM
Works like this, you just need to add the fvm command to the ending of this - flutter pub global run fvm:main. So add any of them like this form:
flutter pub global run fvm:main releases
flutter pub global run fvm:main install 2.2.0
flutter pub global run fvm:main use 2.2.0
are you add "C:\flutter\bin\cache\dart-sdk\bin" to path?
if you in windows you should run your text editor as administrator as following
In my case Error Message was
Usage Error: Flutter version null is not installed
To fix this:
I have activated FVM by pub global activate fvm;
Printed installed fvm list by fvm list, it should give result as the image below:
Selected which Flutter SDK version to use by running fvm use 1.22.0 (in my case 1.22.0, it may differ according to your desired version) command, It will download SDK if it is not installed yet;
Now you can check is flutter running in your project by running flutter;
Also, you can check if the Flutter SDK version set by calling again fvm list.
The tick means, that version is running in your project.

"zsh: command not found: pub" while testing my code for exercism

I want to test my coding exercise for exercism.io. On the Intellij IDEA and Android Studio when I try to type on terminal "$ pub get" and "$ pub run test". I get this error "zsh: command not found: pub or $". I've been stacking here for 2 days. What should I do?
My System: Mac OS Catalina version 10.15.3.
My Android SDK is located: Users/vortovor/Developer/flutter/bin/cache
in cache there is a file named "dart-sdk".
You may want to use the pub shipped with the Flutter version you're using as told on the pub tool section of Dart documentation:
Flutter note: If you’re using the Flutter SDK, don’t use the pub command directly. Instead use the flutter pub command, (...)
flutter pub get
# or
flutter pub test