makdumanarchitect 1.0.5
makdumanarchitect: ^1.0.5 copied to clipboard
A Flutter package that generates a Clean Architecture project structure with automatic dependency management. Creates a scalable, maintainable codebase with pre-configured services, base classes, and [...]
MakdumanArchitect #
A powerful Flutter package that implements Clean Architecture principles, providing a robust and scalable project structure with essential features out of the box.
Features π #
- β Clean Architecture folder structure
- β
Automatic package installation - Uses
flutter pub addfor automatic version resolution - β Pre-configured state management with Provider
- β Network handling with Dio
- β Local storage with Hive
- β Internet connectivity management
- β Firebase integration (Remote Config, Analytics, Crashlytics)
- β Push notifications (Firebase Messaging & Awesome Notifications)
- β Internationalization support with easy_localization
- β In-app review integration
- β Responsive design utilities with flutter_screenutil
- β SVG support with flutter_svg
- β Loading indicators with flutter_easyloading
Installation π¦ #
Add makdumanarchitect to your pubspec.yaml:
dev_dependencies:
makdumanarchitect: ^1.0.3
Run:
flutter pub get
Quick Start πββοΈ #
Generate the project structure:
flutter pub run makdumanarchitect:main
This command will:
- Create the complete Clean Architecture folder structure
- Automatically install all required packages using
flutter pub add(no version conflicts!) - Configure Android and iOS settings
- Set up translation files
- Generate base classes and services
Project Structure π #
The package creates a well-organized project structure following Clean Architecture principles:
β βββ scripts
β β βββ build_sh.dart (<1 KB)
β βββ src
β βββ core
β β βββ base
β β β βββ model
β β β β βββ base_model.dart (<1 KB)
β β β βββ view
β β β β βββ base_view.dart (1 KB)
β β β βββ viewModel
β β β βββ base_view_model.dart (<1 KB)
β β βββ constants
β β β βββ app
β β β β βββ app_constants.dart (<1 KB)
β β β βββ colors
β β β β βββ color_constants.dart (<1 KB)
β β β βββ endPoints
β β β β βββ end_point_constants.dart (<1 KB)
β β β βββ enums
β β β β βββ app_themes_enums.dart (<1 KB)
β β β β βββ http_types_enums.dart (<1 KB)
β β β β βββ network_results_enums.dart (<1 KB)
β β β βββ local
β β β β βββ local_constants.dart (<1 KB)
β β β βββ navigation
β β β β βββ navigation_constants.dart (<1 KB)
β β β βββ notification
β β β β βββ notification_constants.dart (<1 KB)
β β β βββ textStyles
β β β β βββ text_style_constants.dart (3 KB)
β β β βββ theme
β β β βββ theme_constants.dart (<1 KB)
β β βββ exports
β β β βββ constants_exports.dart (<1 KB)
β β βββ extensions
β β β βββ context_extension.dart (2 KB)
β β β βββ sized_box_extension.dart (<1 KB)
β β βββ mixins
β β β βββ device_orientation.dart (<1 KB)
β β β βββ show_bar.dart (1 KB)
β β βββ services
β β βββ analytics
β β β βββ analytics_service.dart (2 KB)
β β βββ local
β β β βββ local_service.dart (1 KB)
β β βββ navigation
β β β βββ navigation_route.dart (<1 KB)
β β β βββ navigation_service.dart (1 KB)
β β βββ network
β β β βββ network_exception.dart (2 KB)
β β β βββ network_service.dart (3 KB)
β β β βββ response_parser.dart (<1 KB)
β β βββ purchase
β β β βββ purchase_manager.dart (5 KB)
β β βββ remote_config
β β β βββ remote_config_service.dart (1 KB)
β β βββ size
β β β βββ size_service.dart (<1 KB)
β β βββ theme
β β βββ theme_service.dart (<1 KB)
β βββ pages
β βββ home
β βββ model
β β βββ post_model.dart (<1 KB)
β β βββ post_model.g.dart (<1 KB)
β βββ view
β β βββ home_view.dart (1 KB)
β βββ viewModel
β β βββ home_view_model.dart (1 KB)
β βββ widget
β βββ one_item.dart (<1 KB)
βββ pubspec.yaml (2 KB)
βββ scripts
βββ build.sh (<1 KB)
Total compressed archive size: 71 KB
Core Features Breakdown π #
Base Classes
BaseModel- Foundation for all models with JSON serializationBaseView- Template for all views with lifecycle managementBaseViewModel- Base for all ViewModels with state management
Services
- Network Service - Dio-based HTTP client with interceptors
- Local Storage - Hive implementation for persistent storage
- Navigation Service - Clean navigation management
- Analytics Service - Firebase Analytics integration
- Remote Config - Firebase Remote Config setup
- Purchase Manager - In-app purchase handling
- Notification Service - Push notification management
Utils
- Context extensions for responsive design
- SizedBox extensions for cleaner spacing
- Device orientation utilities
- Snackbar and dialog mixins
Key Improvements in v1.0.3 π― #
Automatic Dependency Management #
The package now uses flutter pub add to automatically install dependencies, which means:
- β No version conflicts - Flutter automatically resolves compatible versions
- β Always up-to-date - Gets the latest compatible versions
- β Simplified maintenance - No need to manually update version constraints
- β Better compatibility - Works seamlessly with Flutter SDK dependencies
When you run the generator, it will execute:
flutter pub add provider dio hive_flutter connectivity_plus ...
flutter pub add --dev build_runner flutter_lints json_serializable ...
This ensures all packages are installed with versions compatible with your Flutter SDK version.
Usage Examples π‘ #
Creating a New Page #
class HomeView extends BaseView<HomeViewModel> {
@override
Widget build(BuildContext context) {
return BuilderWidget<HomeViewModel>(
viewModel: viewModel,
builder: () => Scaffold(
// Your widget tree
),
);
}
}
Using Network Service #
class ApiService {
Future<ResponseModel> fetchData() async {
return await NetworkService.instance.get<ResponseModel>(
EndPointConstants.endpoint,
model: ResponseModel(),
);
}
}
Local Storage #
await LocalService.instance.setValue('key', 'value');
final value = await LocalService.instance.getValue('key');
Contributing π€ #
Contributions are welcome! Please feel free to submit a Pull Request.
License π #
This project is licensed under the MIT License - see the LICENSE file for details.
Author βοΈ #
Mehmet Akduman - GitHub
If you find this package helpful, please give it a βοΈ on GitHub!