I'm trying to get packages, when I run flutter pub get nothing happens or it get stuck
PS C:\Users\user\Desktop\clone\my_app> flutter pub get
Running "flutter pub get" in my_app... /
Tried upgrading flutter.
Tried running it on multiple networks.
when I used flutter pug get --verbose this was the output:
cloud_firestore","homepage":"https://github.com/firebase/flutterfire/tree/master/packages/cloud_firestore/cloud_firestore_web","repository":"https://github.com/firebase/flutterfire/tree/master/packages/cloud_firestore/cloud_firestore_web","version":"3.1.0","environment":{"sdk":">=2.16.0
<3.0.0","flutter":">=1.20.0"},"dependencies":{"_flutterfire_internals":"^1.0.9","cloud_firestore_platform_interface":"^5.9.0","collection":"^1.0.0","firebase_core":"^2.3.0","firebase_core_web":"^2.0.1","flutter":{"sdk":"flutter"},"flutter_web_plugins":{"sdk":"flutter"},"js":"^0.6.3"},"dev_dependencies":{"firebase_core_platform_interface":"^4.5.2","flutter_test":{"sdk":"flutter"},"mockito":"^5.0.0"},"flutter":{"plugin":{"platforms":{"web":{"pluginClass":"FirebaseFirestoreWeb","fileName":"cloud_firestore_web.dart"}}}}},"archive_url":"https://pub.dartlang.org/packages/cloud_firestore_web/versions/3.1.0.tar.gz","archive_sha256":"3c9a77380e6a053129c2cb6dbe8ef1b708f4350ce0dad220d2c05cd68a2d467f","published":"2022-11-17T14:00:52.599889Z"},{"version":"3.1.1","pubspec":{"name":"cloud_firestore_web","description":"The web implementation of
cloud_firestore","homepage":"https://github.com/firebase/flutterfire/tree/master/packages/cloud_firestore/cloud_firestore_web","repository":"https://github.com/firebase/flutterfire/tree/master/packages/cloud_firestore/cloud_firestore_web","version":"3.1.1","environment":{"sdk":">=2.16.0
<3.0.0","flutter":">=1.20.0"},"dependencies":{"_flutterfire_internals":"^1.0.10","cloud_firestore_platform_interface":"^5.9.1","collection":"^1.0.0","firebase_core":"^2.4.0","firebase_core_web":"^2.0.2","flutter":{"sdk":"flutter"},"flutter_web_plugins":{"sdk":"flutter"},"js":"^0.6.3"},"dev_dependencies":{"firebase_core_platform_interface":"^4.5.2","flutter_test":{"sdk":"flutter"},"mockito":"^5.0.0"},"flutter":{"plugin":{"platforms":{"web":{"pluginClass":"FirebaseFirestoreWeb","fileName":"cloud_firestore_web.dart"}}}}},"archive_url":"https://pub.dartlang.org/packages/cloud_firestore_web/versions/3.1.1.tar.gz","archive_sha256":"b6a5712dc5d74473249b0777b93e6adf0ae68aeabae2699238d4647f3d5e1624","published":"2022-12-08T14:07:35.355432Z"},{"version":"3.2.0","pubspec":{"name":"cloud_firestore_web","description":"The web implementation of
cloud_firestore","homepage":"https://github.com/firebase/flutterfire/tree/master/packages/cloud_firestore/cloud_firestore_web","repository":"https://github.com/firebase/flutterfire/tree/master/packages/cloud_firestore/cloud_firestore_web","version":"3.2.0","environment":{"sdk":">=2.16.0
<3.0.0","flutter":">=1.20.0"},"dependencies":{"_flutterfire_internals":"^1.0.11","cloud_firestore_platform_interface":"^5.10.0","collection":"^1.0.0","firebase_core":"^2.4.0","firebase_core_web":"^2.0.2","flutter":{"sdk":"flutter"},"flutter_web_plugins":{"sdk":"flutter"},"js":"^0.6.3"},"dev_dependencies":{"firebase_core_platform_interface":"^4.5.2","flutter_test":{"sdk":"flutter"},"mockito":"^5.0.0"},"flutter":{"plugin":{"platforms":{"web":{"pluginClass":"FirebaseFirestoreWeb","fileName":"cloud_firestore_web.dart"}}}}},"archive_url":"https://pub.dartlang.org/packages/cloud_firestore_web/versions/3.2.0.tar.gz","archive_sha256":"2d7339bf3f79adcdb123a88e908474478b060317332189bdd5dcb2d498952127","published":"2022-12-22T12:35:55.126423Z"}],"_fetchedAt":"2022-12-28T11:16:24.333312"}
This is the last 6 lines I get
any kind of help will be appreciated.
flutter doctor doesn't work. I added all paths but when I print "flutter doctor" on cmd it shows that:
versionCheckError: Command exited with code 128: gti fetch**
__flutter_version_check__ **stable**
**Standard error: fatal1: unable to access
'https://github.com/flutter/flutter.git/': could not resolve host:
github.com
then I tried again but it shows that:
Running "flutter pub get" in flutter_tools...
and nothing happened
could anyone help me
I added
C:\\src\\flutter\\bin
but nothing happened
hey guys i have error after using command : flutter pub run build_runner build
error message :
C:\Users\matin\AndroidStudioProjects\mosito>flutter pub run build_runner build
Could not find a file named "pubspec.yaml" in "C:\Users\matin\Documents\flutter\.pub-cache\hosted\pub.dartlang.org\async-2.8.1".
pub finished with exit code 66
i try flutter pub upgrade and a lot of things from google but problem not fixed
NOTE: im new to flutter i want use this command for making .g.dart file for my models thanks for your attention
I think may be you are not in your project directory. Suppose you have a project name A in myfolder in C drive of your computer. First goto myfolder with terminal. after that try below code to build the project...
flutter packages pub run build_runner build --delete-conflicting-outputs
Turn on Your Terminal and Run
flutter doctor
if it is showing
Could not find "flutter"
Then you need to install flutter Correctly You Can check :
https://docs.flutter.dev/get-started/install/windows
i am using linux ubunto :
this is output of "echo $PATH":
when i type "flutter doctor", the terminal goes to next line stuck at this point...like i should be writing more...
"flutter doctor":
what am i missing here to get flutter command working ?!
any help would be much appreciated.
Try to re-install flutter SDK, worked for me.
I try to run test on codemagic with custom pre-test script. And this is my pre-test script:
#!/bin/sh
cd libraries
cd dependencies
flutter pub get
cd ..
cd core
flutter pub get
flutter pub run build_runner build --delete-conflicting-outputs
cd ..
cd ..
cd features
cd splash
flutter pub get
flutter pub run build_runner build --delete-conflicting-outputs
cd ..
cd proposal
flutter pub get
flutter pub run build_runner build --delete-conflicting-outputs
And this I my flutter project structure:
But when the pre-test is running, I get this error:
Running "flutter pub get" in dependencies... 2.5s
Running "flutter pub get" in core... 4.9s
The pubspec.lock file has changed since the .dart_tool/package_config.json file was generated, please run "pub get" again.
pub finished with exit code 65
Running "flutter pub get" in splash... 3.0s
The pubspec.lock file has changed since the .dart_tool/package_config.json file was generated, please run "pub get" again.
pub finished with exit code 65
Running "flutter pub get" in proposal... 3.2s
The pubspec.lock file has changed since the .dart_tool/package_config.json file was generated, please run "pub get" again.
pub finished with exit code 65
Build failed :|
Step 4 script `Pre-test script` exited with status code 65
I think this error is because of flutter pub run build_runner build --delete-conflicting-outputs when I want generated .g.dart file via codemagic.
I try to google but still not found a solution, can someone help me how to solve this error on codemagic?
I fix with add flutter pub run twice.
#!/bin/sh
cd libraries
cd dependencies
flutter pub get
cd ..
cd core
flutter pub get
flutter pub get // add again
flutter pub run build_runner build --delete-conflicting-outputs
cd ..
cd ..
cd features
cd splash
flutter pub get
flutter pub get // add again
flutter pub run build_runner build --delete-conflicting-outputs
cd ..
cd proposal
flutter pub get
flutter pub get // add again
flutter pub run build_runner build --delete-conflicting-outputs