This package provides a structured foundation for creating custom Flutter applications. It includes configurations, routing, theming, core functionalities, and utility helpers to streamline the development process.
lib/
├── config/
│ ├── app_helper/
│ │ ├── app_extension.dart
│ │ ├── app_formats.dart
│ │ ├── app_functions.dart
│ │ ├── app_gaps.dart
│ │ └── app_padding.dart
│ ├── router/
│ │ ├── app_router.dart
│ │ └── unknown_route.dart
│ └── theme/
│ ├── dark_theme.dart
│ ├── light_theme.dart
│ └── theme_manager.dart
├── core/
│ ├── network/
│ │ ├── api_provider.dart
│ │ └── app_endpoints.dart
│ └── utils/
│ ├── dialogs.dart
│ ├── logger.dart
│ ├── snack_bar_utils.dart
│ └── validator.dart
├── features/
├── app.dart
├── injection_container.dart
└── main.dart
- Config: Contains helper functions, routing configurations, and theme management.
- Core: Includes network-related utilities and general-purpose utility functions.
- Features: Houses the main application file, dependency injection setup, and the entry point of the app.
- Install the
flutter_custom_creatortool (if not already installed):dart pub global activate flutter_custom_creator
To create a new Flutter project using this custom app structure:
-
Use the tool to create a new project:
flutter_custom_creator example com.yourdomainReplace
examplewith your desired project name andcom.yourdomainwith your app's domain. -
This will create a new Flutter project with the custom structure and files provided by this package.
-
Navigate to your project directory and run the app:
cd example flutter run
After creating your project:
- Modify
lib/main.dartto customize your app's entry point. - Update
lib/features/app.dartto adjust the overall app structure. - Use the provided config, core, and feature directories to build out your app's functionality.
- Modify
app_router.dartto set up your app's navigation structure. - Customize
dark_theme.dartandlight_theme.dartto match your app's design. - Use
app_helperfiles to maintain consistent styling and functionality across your app.
The core/network directory contains classes for API communication:
api_provider.dart: Handles API requests and responses.app_endpoints.dart: Defines API endpoints used in the app.
The core/utils directory provides common utility functions:
dialogs.dart: Helper methods for displaying dialogs.logger.dart: Logging utility for debugging.snack_bar_utils.dart: Functions for displaying snack bar messages.validator.dart: Input validation helpers.
The injection_container.dart file sets up dependency injection for the app. Modify this file to register and manage your app's dependencies.
Contributions are welcome! Please feel free to submit a Pull Request.