salah

Creator: coderz1093

Last updated:

0 purchases

salah Image
salah Images
Add to Cart

Description:

salah

Structurize #
Overview #
A must-have Flutter package for developers looking to implement clean architecture. With easy-to-use generators, you can quickly create start projects, functions, views, view Models, and widgets, while also benefiting from a wide range of useful extensions. Streamline your workflow and build better apps with Structurize.
Installation #
To install Structurize, simply run the following command in your terminal:
flutter pub add --dev structurize
Usage #
Once Structurize is installed, you can use the following commands in your terminal:
Create new project structure #
flutter pub run structurize start
copied to clipboard
This command creates a new project with prepared files and extensions, such as routes, image management, icon management, string management, and the Clean Architecture structure.
Flags #

--force: This flag forces the creation of a new project and deletes existing files.

Your project will look like: #








| Error handling | App Preferences |
| Dio factory | Routes Manager |




















Create function #
flutter pub run structurize add-function <function_name>
copied to clipboard
This command creates the file login_usecase.dart and function in the repository and repository implementation, as well as a remote data source ( if you run it with --local will create function in the local data source file ) and appApi class, which is responsible for getting data from the API.
Flags #

-attr: This flag is used to attach attributes to the function.
Example :
flutter pub run structurize add-function login -attr usrname:String password:String
copied to clipboard

-response: This flag is used to attach the expected response from the API.
Example :
flutter pub run structurize add-function login -response token:String balance:double
copied to clipboard
in the case you wanna get a list of objects , for example get a list of products
you can simply add the prefix “listof” and then specifi the content of each offer
example
flutter pub run structurize add-function getProducts -response listof title:String description:String price:double images:List<String>
copied to clipboard

-modelname: This flag is used when you want to make the name of the model different from the name of the function.
Example :
flutter pub run structurize add-function getUser -response username:String email:String image:String -modelname user
copied to clipboard

-endpoint and -method: These flags are used to specify the endpoint of your HTTP request and the method you are using (GET, POST, etc.).
structurize add-function getUser -response username:String email:String image:String -modelname user -endpoint “auth/user” -method GET
copied to clipboard

--local: This flag is used to add the function to the local data source, such as when you want to get data from the user's device like images or contacts.
structurize add-function getContacts –local -response listof name:String phone:String
copied to clipboard


Live example: #
the resault of this command:
flutter pub run structurize add-function login -attr username:String password:String -response token:String balance:double
copied to clipboard
All this code is generated automatically
















Create screen/view #
flutter pub run structurize create-view <screen/view-name>
copied to clipboard
This command creates a screen in the presentation/views/ directory and adds the screen to the Routes class.
Live example: #
the resault of this command:
flutter pub run structurize create-view home
copied to clipboard





Create viewModel/controller #
flutter pub run structurize create-viewmodel <viewmodel-name>
copied to clipboard
This command creates a viewmodel file in presentation/view_models.
Live example: #
the resault of this command:
flutter pub run structurize create-viewmodel home
copied to clipboard

HomeViewModel

Create widget #
flutter pub run structurize create-widget <widget-name>
copied to clipboard
This command creates a widget file in presentation/widgets.
Live example: #
the resault of this command:
flutter pub run structurize create-widget defaultButton
copied to clipboard


For fun #
After each command you write
you can add --please and you'll get

License #
This package is licensed under the MIT License.

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.

Related Products

More From This Creator