flutter / flutter-intellij

Flutter Plugin for IntelliJ
https://flutter.dev/using-ide
BSD 3-Clause "New" or "Revised" License
1.95k stars 316 forks source link

Feature request: make it easier to start using json_serializable #2365

Open ghost opened 6 years ago

ghost commented 6 years ago

@roughike commented on Feb 10, 2018, 11:00 AM UTC:

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:

json_serializable live template

Quick fixes for running code generation utility and adding needed dependencies

Here's the flow from the users point of view:

By hitting enter, the following steps would be done:

This issue was moved by Hixie from flutter/flutter/issues/14623.

ghost commented 6 years ago

@roughike commented on Feb 10, 2018, 11:03 AM UTC:

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.

ghost commented 6 years ago

@zoechi commented on Feb 11, 2018, 2:19 PM UTC:

Seems related dart-lang/sdk#32103

ghost commented 6 years ago

@Hixie commented on May 29, 2018, 6:15 PM UTC:

@devoncarew This is an IDE feature request.

devoncarew commented 6 years ago

I think @zoechi is right here - we'd need to see a lot more uptake of json_serializable before we'd want to bake support for it into IDEs in a first class way. Generally extensibility - in the vein of dart-lang/sdk#32103 - seems like a good way to go.

zoechi commented 6 years ago

I think integrating build_runner would be a great first step and would help many other code-gen solutions.

Like also suggested in https://github.com/flutter/flutter/pull/16934#issuecomment-397567649