Skip to content

New feature to export changes from DevTools directly to the code #2203

Description

@cankush625

Use case

  1. When the content overflows or layout displays differently than what we expected, then we go to the Flutter DevTools and start trying different aspects to fix the problem.
    For eg. If the text goes out the screen then we try to set different properties like flex and resolve it.
  2. One thing good with the DevTools is that we can see the changes in real-time. But when we reload the program all of the previous changes from the DevTools get reverted.
    This will make it quite time-consuming to first try from the DevTools then go to the code and make changes there.

Proposal

  1. One button should be provided in the Flutter DevTools for committing the changes to the code.
  2. What is expected is that when we make changes from the DevTools and if at any point we thought that the changes we had made are exactly what we want then we will press this button.
  3. Behind the scene, the DevTools will record the changes we had made and as soon as the button to commit changes to the code is pressed, the code should be created or updated according to the changes we had made from the DevTools in the respected dart code file.

Example

I haven't used any Flexible widget in my code and haven't set any flex value. If the text overflows from my screen then I will go to the Flutter DevTools and try to make some changes to see if anything fixes it. Let's say, the flex with the value 1 fixed my problem. Then I will hit the button which will make the changes according to what changes I made form the DevTools.
Here, after I hit that button, the respected code will automatically be wrapped up by the Flexible widget and the flex value will be set to 1.

Activity

  1. helin24 commented on Jul 27, 2020

    @helin24
    Member

    Thanks for the detail! Is this issue similar to what you're looking for? #2135

  2. cankush625 commented on Jul 27, 2020

    @cankush625
    Author

    @helin24 It looks like something similar to #2135 But he hasn't provided extra details so hard to guess

  3. helin24 commented on Jul 27, 2020

    @helin24
    Member

    Okay, I think we're going to track this feature on #2135. I'll add a comment there mentioning that your post has some more details about a use case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions