Build Flutter Apps Faster: Leverage the Power of Templates
Are you tired of starting each new Flutter project from scratch, adding essential features like flavors, icons, splash screens, offline app handling, theming, notifications, and analytics? Our template repository simplifies this process, providing a solid foundation that accelerates your development journey, allowing you to focus on what truly matters.
With pre-built components and best practices at your fingertips, you can bring your app ideas to life faster than ever before.
We offer two types of templates:
- 🆓Free Flutter Template: Provides a solid foundation with core features like utilities, dependency injection, internationalizations, etc.
- 👑Premium Flutter Template: Offers advanced capabilities and customization options like flavors, splash-screen, offline support, etc.
Whether you need a basic foundation or advanced customization options, our templates offer a streamlined development experience.
To help you choose the right template, we've provided a detailed comparison table that outlines the features included in both the Free as well as Premium Flutter Templates:
Legend:
✅ Completed
⬜ Pending
❌Not Included[[hr]]
How to get started?
Free Template
To get started with this free template, follow these steps:
1. Clone the Repository:
2. Change directory to flutter_template
3. Install Dependencies:
👑Premium template
To access the Premium template, you need to purchase a license.
Please contact us at nattu@codewalnut.com for more information.
[[hr]]
What features does it have?
1. Clean Folder Structure
The folder structure is designed to be easy to understand, manage, scale & maintain.
lib:
common:
This folder contains reusable code shared across the app. It includes subfolders like:
- exceptions: Contains all the custom extensions in the app
- extension: Contains all the extensions in the app like time-formatting, date-formatting, etc.
- mixins: Mixins used throughout the app.
- translations: It has translations-related files (e.g localekeys class)
- widgets : Contains common UI components like buttons, banners, app bars, etc.
- models: Data models used across the app.
- utils: Helper functions and utilities for various tasks like form validation.
features
The repository follows a feature-based folder structure. Each app feature is isolated within its own folder, making it easier to manage and scale. Each feature folder might include its own widgets, models, and logic, ensuring modularity.
core
This folder contains foundational elements essential to the entire app, such as routes, themes, dependencies, global keys, logger, etc. These components are crucial for the app's overall architecture and are reused throughout the project.
assets: Contains all the assets used in the app.
- images: Stores all image files used in the app.
- fonts: Custom fonts used in the app.
- svg: Contains SVG images
- translations: Contains language translations
- anim: Contains animations file in Lottie json
dev_assets: Contains all the assets needed for development like icon images, splash screen images, etc which will help generate the icon and splash screen.
Free:
👑Premium:
scripts: The scripts folder contains shell scripts that automate common tasks during the app development process. These scripts help streamline building and generating assets for different environments.
Free:
👑Premium:
[[hr]]
2. Utilities
The utilities (or utils) are used to store reusable helper classes and functions that assist with various common tasks across the app. These are typically not specific to any particular feature but are instead general-purpose tools that can be used throughout the project.
common
- base_exception.dart: Base class for all custom exceptions.
- no_internet_exception.dart: Exception for handling no internet connection.
- payment_failed_exception.dart: Exception for payment failures.
- something_went_wrong.dart: General exception for unexpected errors.
- iterable_extension.dart: Extensions for iterable types.
- list_extension.dart: Extensions for lists.
- map_extension.dart: Extensions for maps.
- string_extension.dart: Extensions for strings.
- time_extension.dart: Extensions for time-related operations.
- state_mixin.dart: Mixin for managing state-related functionality.
- app_assets.dart: Central place to access app assets like images, fonts, and icons.
- app_locales.dart: Contains supported locales within the app.
- constants.dart: Defines and stores constant values used throughout the app, such as API endpoints or fixed strings.
- input_formatter.dart: Provides utilities for formatting user input, like phone numbers in text fields.
- timer.dart: Includes utility functions or classes for managing timers or countdowns within the app.
- utils.dart: A general-purpose file for various utility functions and helpers that don’t fit into the other specific categories like url launcher, download etc.
- validator.dart: Contains functions for validating user input, such as checking email formats or password strength.
core:
- app_directory_path.dart: Initializes and manages the application's document directory.
- app_routes.dart: Defines and manages the app’s navigation routes.
- app_theme.dart: Contains the app’s theme settings, such as colors, fonts, and styles.
- core.dart: Centralizes and exports all files in the core folder for easy import across the app.
- dependency_manager.dart: Manages dependency injection, initializing and providing services across the app.
- env_configs.dart (👑premium) : Stores environment-specific configurations, such as API base URLs.
- global_keys.dart: Defines global keys used throughout the app, such as ScaffoldMessengerKey for managing the state of snack bars.
- logger.dart: Handles logging throughout the app, useful for debugging and tracking issues.
- store_manager.dart: Manages secure and non-secure data storage, handling encryption where needed for central control of app data.
- build_apk.sh: Script to build an APK.
- build_apk_dev.sh (👑premium): Script to build an APK for the development environment.
- build_apk_prod.sh (👑premium): Script to build an APK for the production environment.
- build_apk_stg.sh (👑premium): Script to build an APK for the staging environment. This is useful for testing in an environment similar to production but not public-facing.
- build_app_bundle.sh: Script to build an Android App Bundle (AAB).
- build_app_bundle_prod.sh (👑premium): Script to build an Android App Bundle (AAB) for the production environment.
- generate_app_icons.sh: Script to automatically generate app icons for various screen sizes and platforms from a single image source.
- generate_locales.sh: Script to generate localization files for the app.
Free:
👑Premium:
[[hr]]
3. Build-in Required Packages
This template comes with pre-installed most required packages so that you don't need to add it yourself. You can check the pubspec.yaml for the full list of packages or check it below.
Networking
- dio: Powerful HTTP client for Dart.
- dio_cache_interceptor: Provides caching for dio requests.
- dio_cache_interceptor_hive_store: Cache storage for dio using Hive.
- connectivity_plus: Connectivity status for handling network changes.
- internet_connection_checker: Checks the internet connection status.
Logging
- logger: A simple logger for debugging and tracking application behavior.
UI Components
- flutter_svg: For displaying SVG images.
- flutter_svg_provider: Provides SVG images as ImageProvider.
- cached_network_image: Caches network images for better performance.
- carousel_slider: Implements a carousel slider widget.
- lottie: For rendering Lottie animations.
- shimmer: Adds shimmering effect to widgets.
- flutter_typeahead: Provides typeahead suggestions in input fields.
- flutter_widget_from_html: Renders HTML content as Flutter widgets.
Routing
- go_router: Provides a declarative routing API for Flutter.
State Management
- flutter_bloc: State management using BLoC (Business Logic Component) pattern.
Dependency Injection
- get_it: Service locator for dependency injection.
Internationalization
- easy_localization: Simplifies localization in Flutter.
- intl: Internationalization and localization support.
Utilities
- collection: Utilities for Dart collections.
- rxdart: Reactive extensions for Dart.
- share_plus: For sharing content with other apps.
- otp_autofill: Automatic OTP (One-Time Password) filling.
- webview_flutter: Displays web content in a Flutter widget.
- url_launcher: Launches URLs in the mobile platform.
- package_info_plus: Retrieves package information.
- retry: Adds retry functionality to Dart operations.
- path_provider: Provides paths to directories for storing files.
- app_tracking_transparency: Manages app tracking transparency settings.
- uuid: Generates unique IDs.
- in_app_update: Handles in-app updates.
- equatable: Simplifies value equality comparison.
Storage
Security
- crypto: Provides cryptographic functions.
- flutter_jailbreak_detection: Detects if the app is running on a jailbroken device.
- flutter_secure_storage: Secure storage for sensitive data.
File Handling
- archive: Provides tools for working with archives.
- flutter_file_dialog: Provides file dialogs for file selection and saving.
Background Jobs
- workmanager: Manages background tasks.
Analytics
- firebase_analytics: Analytics for tracking user interactions.
- firebase_crashlytics: Crash reporting for monitoring app stability.
- firebase_performance: Performance monitoring.
Firebase Integration
- firebase_core: Core Firebase plugin.
Authentication
- firebase_auth: Firebase authentication for user management.
- google_sign_in: Google sign-in integration.
Remote Config
- firebase_remote_config: Manages remote configuration parameters.
Notifications
- firebase_messaging: Handles Firebase Cloud Messaging (FCM) for push notifications.
- flutter_local_notifications: Local notifications for scheduling and displaying notifications.
Development Dependencies
- flutter_test: Flutter's testing framework.
- flutter_lints: Recommended lints for good coding practices.
- build_runner: Used for code generation tasks.
- icon_font_generator: Generates icon fonts from SVG files.
- flutter_launcher_icons: Manages app icons for different platforms.
- flutter_native_splash: Creates native splash screens.
4. Dependency Injection
This template includes a dependency injection setup using get_it. For more information, refer to the get_it documentation. Dependencies are defined in core/dependency_manager.dart.
5. Internationalization
We use easy_localization for internationalization. Refer to the easy_localization documentation for further details. By default, the template supports two locales: English (USA) and Hindi (India).
6. Icons Generation
For automatic icon generation across different screen sizes and platforms, we utilize the flutter_native_splash package. Simply place your desired icons in the dev_assets folder, similar to our existing setup. Then, run the generate_app_icons.sh script, which will generate icons for each flavor (applicable only to the 👑premium version).
Icon Configuration:
Free Version: You can customize your app icons directly in the flutter_launcher_icons.yaml file.
👑Premium Version: For greater control, we provide separate configuration files for each flavor:
flutter_launcher_icons-dev.yaml (Development)
flutter_launcher_icons-stg.yaml (Staging)
flutter_launcher_icons-prod.yaml (Production)
7. Flavors (👑premium)
This feature is exclusively available in the premium version. It offers three distinct environments: development, staging, and production. Each environment has its unique icon, splash screen, application ID, and configuration settings, which are defined in the core/env_configs.dart file.
We've also integrated run configurations for Android Studio to streamline development and testing across these different environments.
Now that you have insights into the codebase—understanding the purpose of each file, the rationale behind selected libraries, and the pre-built boilerplates available—you’re well-equipped to hit the ground running. Start building your next project confidently, and take advantage of the features designed to simplify and speed up your workflow. Explore our repository today and elevate your Flutter experience!
Free Flutter Template: https://github.com/CW-Codewalnut/free_flutter_template
Premium Flutter template: Contact us at nattu@codewalnut.com
Get in touch - Our team has developed scalable solutions for enterprises and has a Crunch rating of 4.9⭐.
Experience coding prowess firsthand. Choose CodeWalnut to build a prototype within a week and make your choice with confidence.
Accelerate your web app vision with CodeWalnut. In just a week, we'll shape your idea into a polished prototype, powered by Vercel. Ready to make it real? Choose us with confidence!
Dreaming of a powerful web app on Heroku? Let CodeWalnut bring it to life in just one week. Take the leap and trust us to deliver with confidence!