Extract widget

Extract widget

Writing a large widget tree is difficult to read/understand and can create issues in the performance of the app too. Its always better to split the widget tree in the stateless widgets. More info can be found here.

I am going to show you a quick way to do this.

  1. Select the Widget.
  2. Right click ->Refactor -> Extract -> Flutter Widget.

And the shortcut is Ctrl + Alt + W(PC) | ⌃ + ⌥ + W(Mac)


No comments:

Post a Comment

Note: only a member of this blog may post a comment.

How to extract filename from Uri?

Now, we can extract filename with and without extension :) You will convert your bitmap to uri and get the real path of your file. Now w...