Flutter MVC Architecture Generator
Visual studio code extension to generate MVC and MV patterns template code using providers
Features
Create MV
The create MV command or menu will add a MV.
Example
If you give parameter for class name as home
, the extension will create a directory structure like this
--root
|-- android
|-- ios
|-- lib
|-- components
|-- models
|-- home
|-- home_model.dart
|-- views
|-- home
|-- components
|-- layouts
|-- home_view.dart
|-- main.dart
|-- test
|-- pubspec.yaml
It will also add the following dependencies to the pubspec.yaml
file
Create MVC
The create MVC command or menu will add a MVC.
Example
If you give parameter for class name as home
, the extension will create a directory structure like this
--root
|-- android
|-- ios
|-- lib
|-- components
|-- models
|-- home
|-- home_model.dart
|-- views
|-- home
|-- components
|-- layouts
|-- home_view.dart
|-- controllers
|-- home
|-- home_controller.dart
|-- main.dart
|-- test
|-- pubspec.yaml
It will also add the following dependencies to the pubspec.yaml
file
Create Model
The create model command or menu will add a Model.
Example
If you give parameter for class name as home
, the extension will create a directory structure like this
--root
|-- android
|-- ios
|-- lib
|-- models
|-- home
|-- home_model.dart
|-- main.dart
|-- test
|-- pubspec.yaml
It will also add the following dependencies to the pubspec.yaml
file
Create View
The create view command or menu will add a View.
Example
If you give parameter for class name as home
, the extension will create a directory structure like this
--root
|-- android
|-- ios
|-- lib
|-- components
|-- views
|-- home
|-- components
|-- layouts
|-- home_view.dart
|-- main.dart
|-- test
|-- pubspec.yaml
It will also add the following dependencies to the pubspec.yaml
file
Create Controller
The create controller command or menu will add a Controller.
Example
If you give parameter for class name as home
, the extension will create a directory structure like this
--root
|-- android
|-- ios
|-- lib
|-- controllers
|-- home
|-- home_controller.dart
|-- main.dart
|-- test
|-- pubspec.yaml
It will also add the following dependencies to the pubspec.yaml
file
Example code
MVC Demo