I was reading an article from Edrick Leong (link) on seperating flutter's State
into View
and ViewModel
and I thought that it was a great idea. However, manually creating a folder and three files everytime I want to make a widget is a pain so I'm just making this extension for my own personal use.
What this extension does it that it generate Flutter's widget file along with View
and ViewModel
.
CMD
+ Shift
+ P
Flutter MVVM Widget: Generate stateful widget
Input the widget name in camel case and then select the directory where the generated files should be placed.