You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Map pub run to flutter package run command or similar #9301
Yes, that seems likely. The reason we wrap pub with the flutter tool is the flutter tool tells pub where to find the Flutter SDK on disk. I'm not sure what happens if you try to pub run something with an out-of-date .packages file. If it calls through to pub get, then it's important that we wrap it so that the get operation will know how to find the Flutter SDK.
Currently to use pub I have to export FLUTTER_ROOT env variable, but it only plays well with the Dart SDK provided by Flutter (flutter/bin/cache/dart-sdk/bin/). I would love to see flutter command to run Dart scripts:)
changed the title [-]Documentation: Setup - missing path to Dart SDK[/-][+]Map `pub run` to `flutter package run` command or similar[/+]on Apr 10, 2017
I was following Intl documentation here: https://pub.dartlang.org/packages/intl
There is a paragraph Extracting And Using Translated Messages and there are 2 Dart script to be run: pub run intl_translation:extract_to_arb and pub run intl_translation:generate_from_arb.
With current Flutter setup guide (https://flutter.io/setup-macos/) it is not possible to run them.
That is why i have asked to export Dart SDK or proxy pub run method.
Intl is used in Stocks example app, so I guess this is a recommended solution for i18n for now.
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.
Activity
abarth commentedon Apr 8, 2017
It's intentional that we don'd add the Dart SDK to the path. We'll need to look at
Intlto see what it needs.dbacinski commentedon Apr 8, 2017
ok, so we need
flutter packages runor similar to run Dart scriptsabarth commentedon Apr 8, 2017
Yes, that seems likely. The reason we wrap
pubwith thefluttertool is thefluttertool tellspubwhere to find the Flutter SDK on disk. I'm not sure what happens if you try topub runsomething with an out-of-date.packagesfile. If it calls through topub get, then it's important that we wrap it so that thegetoperation will know how to find the Flutter SDK.dbacinski commentedon Apr 10, 2017
Currently to use
pubI have to exportFLUTTER_ROOTenv variable, but it only plays well with the Dart SDK provided by Flutter (flutter/bin/cache/dart-sdk/bin/). I would love to seefluttercommand to run Dart scripts:)[-]Documentation: Setup - missing path to Dart SDK[/-][+]Map `pub run` to `flutter package run` command or similar[/+]eseidelGoogle commentedon Apr 12, 2017
It looks like the specific user journey being asked for here is the instructions on how to correctly use package:intl with your flutter project?
dbacinski commentedon Apr 12, 2017
I was following Intl documentation here: https://pub.dartlang.org/packages/intl
There is a paragraph
Extracting And Using Translated Messagesand there are 2 Dart script to be run:pub run intl_translation:extract_to_arbandpub run intl_translation:generate_from_arb.With current Flutter setup guide (https://flutter.io/setup-macos/) it is not possible to run them.
That is why i have asked to export Dart SDK or proxy
pub runmethod.Intl is used in Stocks example app, so I guess this is a recommended solution for i18n for now.
dotdoom commentedon Feb 24, 2018
Looks like this is now available with
flutter packages pub run. I've just used for the exact same purpose @dbacinski mentioned.github-actions commentedon Aug 17, 2021
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.