Flutter Clean Architecture Extension
Overview
The Flutter Clean Architecture Extension is a powerful tool for organizing your Flutter projects using clean architecture principles. It automates the creation of folder structures and essential files, making it easier for you to maintain clean and scalable code.
Features
- Automated folder structure creation based on clean architecture.
- Generation of key files for each layer of the architecture.
- Streamlined project setup for clean, maintainable code.
- Easily generate toEntity and fromEntity methods for your Dart classes representing data models.
Installation
To install the Flutter Clean Architecture Extension, follow these steps:
- Open Visual Studio Code.
- Go to the Extensions view by clicking on the square icon in the sidebar.
- Search for "Flutter:Clean Architecture" in the Extensions view search bar.
- Click the "Install" button next to the extension offered by the official publisher.
Usage
After installing the extension, you can use it to create a clean architecture structure for your Flutter project:
- Open your Flutter project directory in Visual Studio Code.
- Right-click on the directory where you want to create the architecture structure.
- Select "Build Clean Architecture Skeleton" from the context menu.
- Follow the prompts to choose architecture layers and provide necessary details.
The extension will automatically create the folder structure and files based on your selections.
https://github.com/18Ashelar/flutter-clean-architecture/assets/34418388/b39ac6b1-2c4e-4124-bb80-03775e68e202
For Generating toEntity() and fromEntity() method:
- Open a Dart or Flutter file.
- Place your cursor on a Dart class variable to generate toEntity and fromEntity methods.
- Press Ctrl+. to open the VS Code quick fix menu.
- You will see two code generation options:
Generate toEntity and Generate fromEntity
- Select one of the option to generate toEntity or fromEntity method.
https://github.com/18Ashelar/flutter-clean-architecture/assets/34418388/bab668b4-933d-44d5-8bb2-b26730fabf3c
Contributing
Contributions are welcome! If you'd like to contribute to this project, please follow these guidelines:
- Fork the repository.
- Create a new branch for your feature or bug fix.
- Commit your changes.
- Submit a pull request.
Happy coding!