FlutterCore-KIT
An extension to support FlutterCore that will make the process of creating View (Screen) and View Model faster and easier.
Getting started
First thing to do is to ensure that your Flutter project is already using the FlutterCore dependency. If not, you can add it first.
After that you can install FlutterCore-KIT on VSCode here: Visual Studio Code Marketplace
Usage
Methode 1
- Right click on your directory
- Select
FlutterCore-KIT: New View (Screen) + VM to create View (Screen) and ViewModel
- Select
FlutterCore-KIT: New View (Screen) + VM With Folder to create View (Screen) and ViewModel inside Folder
Methode 2
- Open Command Pallete (
CMD + Shift + P for MacOS and Ctrl + Shift + P for Windows)
- Find or type
FlutterCore-KIT: New View (Screen) + VM to create View (Screen) and ViewModel
- Find or type
FlutterCore-KIT: New View (Screen) + VM With Folder to create View (Screen) and ViewModel inside Folder
Note: The folder name, view (screen), and ViewModel will automatically adjust according to the name you write when creating the VVM.
Example Result
View (Screen)
import 'package:flutter/material.dart';
import 'package:flutter_core/base/screen/core_screen.dart';
import 'hallo_world_view_model.dart';
class HalloWorldScreen extends CoreScreen<HalloWorldViewModel> {
const HalloWorldScreen({super.key});
static const routeName = '/hallo-world-screen';
@override
Widget buildScreen(BuildContext context) {
return Scaffold();
}
}
ViewModel
import 'package:flutter_core/base/viewmodel/core_view_model.dart';
class HalloWorldViewModel extends CoreViewModel {
}
Snippets
Shortcut |
Description |
getpage / gp |
Create a GetPage |
getlazyput / glp |
Create a GetLazyPut |
getlazyputfenix / glpf |
Create a GetLazyPut With fenix true |
collectable / clt |
Create a Collectable |
collectablelist / cltl |
Create a Collectable List |
Changelog
You can check it here CHANGELOG.md.
Special Thanks
- @yzzzd. The creator of FlutterCore, who has inspired me to create this extension to support FlutterCore.
- @felangel. The creator of Bloc, which I used as a reference for creating this extension.
| |