question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

automatically run flutter generate

See original GitHub issue

I would like to have something similiar to promptToRunPubGet that asks user to run flutter generate, maybe it could be even done in the same operation?

  1. User agrees to download packages.
  2. After packages have been downloaded, DartCode checks if builders: option exists in pubspec.
  3. If that option exists, it runs flutter generate and updates the prompt message.
  4. After that we assume that, assuming #1970 was fixed, the error will disappear.

The goal is: a newbie clones the project, follows prompts, and has project that compiles and shows no errors.

Example project is available here: https://github.com/Dart-Code/Dart-Code/issues/1970#issuecomment-528333884

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:3
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
DanTupcommented, Oct 7, 2019

Great, that sounds like it would allow us to prompt in the fresh-repo case at least. Thanks!

0reactions
szotpcommented, Jul 31, 2020

Closing this because flutter generate will be removed 😦

Read more comments on GitHub >

github_iconTop Results From Across the Web

Automatically run build_runner when opening a Dart or Flutter ...
With this set, when you hit F5 to try and run the project, it'll first run build_runner watch . Once it sees the...
Read more >
build_runner - Dart
The build_runner package provides general-purpose commands for generating files, including testing the generated files or serving both source and generated ...
Read more >
Continuous delivery with Flutter
How to automate continuous building and releasing of your Flutter app.
Read more >
Flutter Code Generation: Getting Started - RayWenderlich.com
Learn how to use code generation to automatically create Dart models, eliminating tedious ... Run flutter pub get in the generators folder.
Read more >
How to generate flutter code before every build - Stack Overflow
It's important that this is run automatically before builds triggered by i.e. flutter run or flutter build apk . If I have to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found