-
Notifications
You must be signed in to change notification settings - Fork 28.5k
Feature request: make it easier to start using json_serializable #14623
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
If somebody can point me in the right direction (and if including these kind of features makes sense), I would like to take a stab at this. |
Seems related dart-lang/sdk#32103 |
@devoncarew This is an IDE feature request. |
This issue was moved by Hixie to flutter/flutter-intellij/issues/2365. |
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 |
If
json_serializable
is the officially recommended JSON library for Dart / Flutter, it would make sense to make it easier to get started with it.A live template for json_serializable models
To create a
json_serializable
model, some amount of boilerplate code is required from the user. A live template makes the process much more convenient.It would look something like this:
Quick fixes for running code generation utility and adding needed dependencies
Here's the flow from the users point of view:
json_serializable
model class with the live templateUser
class has a squiggly red line under the name, saying "Code not generated yet"By hitting enter, the following steps would be done:
json_serializable
package is declared in pubspec file. If not, add it automatically and refresh the dependencies.flutter packages pub run build_runner build
to build the generated code.The text was updated successfully, but these errors were encountered: