simple_getx_folder_create 0.0.5
simple_getx_folder_create: ^0.0.5 copied to clipboard
A new getx simple folder create
Features #
- Automatically sets up a base folder structure for a Flutter project using the
GetandGetStoragepackages. - Creates a custom folder structure for new pages, including
view,controller,model,provider, andbindingsubfolders. - Includes pre-written Dart files with boilerplate code for efficient development.
- Supports initial setup with automatic installation of required packages and updates to
main.dart.
Getting Started #
-
Ensure you have Flutter installed on your system and set up correctly.
-
Add the
simple_getx_folder_createpackage to your Flutter project or clone the repository. -
Run the following command in your terminal to initialize the project structure:
dart run simple_getx_folder_create -
For additional page-specific folder structures, use the
-fflag as described below.
Usage #
Initial Setup #
-
Run the command to install the required dependencies (
GetandGetStorage) and set up the base folder structure:dart run simple_getx_folder_create -
The setup will:
- Create a
libfolder structure with directories likepages,network,utils, andwidgets. - Update the
main.dartfile with pre-configured boilerplate code. - Create a
splashpage as the default initial route.
- Create a
Add a New Page #
-
Use the
-fflag to create a new page folder structure:dart run simple_getx_folder_create -f your_folder_name -
This will generate:
- A folder named after your page inside the
lib/pagesdirectory. - Subfolders (
view,controller,model, etc.) within the page folder. - Sample Dart files in each subfolder to help you get started.
- A folder named after your page inside the
Example #
To create a new page named home:
dart run simple_getx_folder_create -f home
This will generate:
lib/
└── pages/
└── home/
├── view/
│ └── home_page.dart
├── controller/
│ └── home_controller.dart
├── model/
│ └── home_model.dart
├── provider/
│ └── home_provider.dart
└── binding/
└── home_binding.dart
Additional Information #
- After the initial setup, you may need to update the
api_service.dartfile with your API-related logic. - Customize the generated files as per your project requirements.
- Contributions are welcome! Feel free to submit issues or pull requests.