Flutter-TDD-Clean-Architecture-电子商务应用
一个使用 Flutter、TDD、Clean Architecture 和 BLoC 构建的现代电子商务移动应用。
- 星标
- 307
- 复刻
- 103
- 最近推送(UTC)
- 2026年2月11日
- 项目状态
- 未归档
原始 README
以下为英文项目原文快照,最新内容请访问 GitHub。
Flutter TDD Clean Architecture E-Commerce App - EShop
Welcome to the Flutter-TDD-Clean-Architecture-E-Commerce-App GitHub repository! This project is a showcase of modern mobile app development practices, leveraging the power of Flutter, Test-Driven Development (TDD), Clean Architecture, and the BLoC (Business Logic Component) package. Built using the latest version of Flutter 3, this E-Commerce application exemplifies best practices for building scalable, maintainable, and efficient Flutter apps.
Key Features:
- Test-Driven Development (TDD): This project emphasizes the importance of writing tests before writing the actual code. It ensures that the application's logic is thoroughly tested, enhancing reliability and maintainability.
- Clean Architecture: The app follows a clean and modular architecture that separates concerns into different layers: Presentation, Domain, and Data. This architecture promotes code reusability and makes it easier to adapt to changes in the future.
- BLoC State Management: The app utilizes the BLoC pattern for state management. BLoC helps manage the flow of data and business logic in a clean and reactive manner, improving overall app performance.
- E-Commerce Functionality: The app showcases a variety of E-Commerce features, such as product browsing, searching, cart and purchasing. Users can explore products, add them to their cart, and complete transactions seamlessly.
| Feature | UseCases |
|---|---|
| Product | Get Product UseCase |
| Category | Get Cached Category UseCase Get Remote Category UseCase Filter Category UseCase |
| Cart | Get Cached Cart UseCase Get Remote Cart UseCase Add Cart Item UseCase Sync Cart UseCase |
| User | Get Cached User UseCase SignIn UseCase SignUp UseCase SignOut UseCase |
| Delivery Info | Get Cached Delivery Info UseCase Get Remote Delivery Info UseCase Add Delivery Info UseCase Edit Delivery Info UseCase Select Delivery Info UseCase Get Selected Delivery Info UseCase |
| Order | Get Orders UseCase Add Order UseCase |
Demo Sample
|
|
|
|
|
|
Backend Options
Nest JS Backend
- Source Code - https://github.com/Sameera-Perera/E-Commerce-App-Backend
Contributing:
We welcome contributions from the Flutter community to make this project even better. Whether you are interested in adding new features, fixing bugs, or improving documentation, your contributions are highly appreciated. Please refer to the contribution guidelines in the repository for more details on how to get involved.
Getting Started
To get started with this project, follow the instructions in the README to set up your development environment and run the app locally. You can also explore the project's architecture, tests, and documentation to gain insights into building robust Flutter apps.
We hope this Flutter-TDD-Clean-Architecture-E-Commerce-App serves as a valuable resource for both Flutter enthusiasts and developers looking to learn about TDD, clean architecture, and BLoC in the context of mobile app development. Happy coding!
Installation
- Clone the repo
git clone https://github.com/Sameera-Perera/Flutter-TDD-Clean-Architecture-E-Commerce-App.git - Install packages
flutter pub get - Run app
flutter run lib/main.dart - Run test
flutter test
For help getting started with Flutter, view our online documentation.
License
Distributed under the MIT License. See LICENSE for more information.
Contributors ✨
Thanks to these wonderful people:
AaronDsilva97 |
分类
使用的依赖
依赖清单 23 项
- flutter
{"sdk":"flutter"} - cupertino_icons
^1.0.8 - shared_preferences
^2.2.0 - flutter_secure_storage
^8.0.0 - bloc
^8.1.2 - flutter_bloc
^8.0.1 - get_it
^7.6.0 - http
^0.13.3 - equatable
^2.0.5 - dartz
^0.10.1 - internet_connection_checker
^1.0.0+1 - oktoast
^3.3.1 - flutter_snake_navigationbar
^0.6.1 - shimmer
^3.0.0 - cached_network_image
^3.3.1 - carousel_slider
^5.0.0 - smooth_page_indicator
^1.1.0 - flutter_easyloading
^3.0.5 - sizer
^3.0.5 - flutter_test开发依赖
{"sdk":"flutter"} - flutter_lints开发依赖
^5.0.0 - mocktail开发依赖
^0.3.0 - bloc_test开发依赖
^9.1.4
所在榜单
如何选择适合项目的代码仓?
先按使用场景筛选,再比较项目活跃情况,最后到原始仓库核对使用要求。
- 通过仓库名、作者或描述搜索,再按技术分类缩小范围。
- 结合星标、复刻与最近推送比较项目;星标反映社区关注,不代表质量保证。
- 使用前在 GitHub 核对 README、许可证与 Issues。
来源与维护
“A repository is the most basic element of GitHub.”
GitHub Docs — About repositories ↗
