A production-ready Flutter application template with Firebase integration, comprehensive theming, reusable widgets, and best practices for scalable app development.
- Light & Dark Mode: Full support with Material 3 design
- Theme Persistence: Automatically saves user's theme preference
- Customizable Colors: Comprehensive color system with semantic naming
- Typography: Pre-configured text styles for consistent UI
- Firebase Core: Pre-configured and ready to use
- Firebase Auth: Authentication support included
- Easy Configuration: Simple setup with FlutterFire CLI
- Interactive Maps: Google Maps integration with customizable markers
- Location Services: Built-in location tracking support
- Custom Controls: Easy-to-use map widget wrapper
- Line Charts: Interactive line charts using fl_chart
- Bar Charts: Customizable bar charts
- Pie Charts: Visual data representation with legends
- Input Widgets: Text fields, dropdowns, date/time pickers, places picker
- Buttons: Primary, secondary, outlined, and text button variants
- Cards: Consistent card components
- Dialogs: Customizable dialog system
- Loading Indicators: Various loading states
- GoRouter: Modern declarative routing
- Type-safe Routes: Route constants for better maintainability
- Error Handling: Built-in 404 error pages
- Ming Cute Icons: Beautiful icon library with line and filled variants
- Centralized Icon Management: Easy icon access through
AppIconsclass
- Environment Variables: Support for dev, staging, and production environments
- API Configuration: Centralized API endpoint management
- App Configuration: Version, build number, and app metadata
- Flutter SDK 3.9.2 or higher
- Dart SDK
- Firebase account (for Firebase features)
- Google Maps API key (for maps functionality)
git clone <repository-url>
cd app_templateflutter pub get-
Copy the example environment file:
cp .env.example .env
-
Edit
.envand fill in your actual values:APP_ENV=dev API_BASE_URL=https://api.example.com API_VERSION=v1 APP_VERSION=1.0.0 APP_BUILD_NUMBER=1 GOOGLE_MAPS_API_KEY=your_google_maps_api_key_here
-
Install FlutterFire CLI:
dart pub global activate flutterfire_cli
-
Configure Firebase:
flutterfire configure
This generates
lib/firebase_options.dartwith your Firebase configuration.
- Get a Google Maps API key from Google Cloud Console
- Add the API key to your
.envfile - For Android, add to
android/app/src/main/AndroidManifest.xml:<meta-data android:name="com.google.android.geo.API_KEY" android:value="YOUR_API_KEY"/>
- For iOS, configure in
ios/Runner/Info.plist
flutter runlib/
βββ main.dart # App entry point
βββ core/
β βββ config/ # Configuration files
β β βββ app_config.dart # App-level configuration
β β βββ api_config.dart # API configuration
β β βββ api_endpoints.dart # API endpoints
β β βββ firebase_config.dart # Firebase initialization
β β βββ environment.dart # Environment enum
β βββ constants/
β β βββ app_constants.dart # App-wide constants
β βββ routing/
β β βββ app_router.dart # Navigation configuration
β βββ theme/ # Theme system
β β βββ app_theme.dart # Main theme configuration
β β βββ app_colors.dart # Color definitions
β β βββ app_text_styles.dart # Text style definitions
β βββ utils/
β βββ env_loader.dart # Environment variable loader
β βββ app_icons.dart # Icon helper
βββ features/ # Feature modules
β βββ home/ # Home feature
β βββ splash/ # Splash screen
β βββ README.md # Feature structure guide
βββ shared/
βββ widgets/ # Reusable widgets
βββ inputs/ # Input widgets
βββ buttons/ # Button widgets
βββ cards/ # Card widgets
βββ loading/ # Loading indicators
βββ dialogs/ # Dialog widgets
βββ charts/ # Chart widgets
βββ maps/ # Map widgets
- firebase_core: Firebase integration
- firebase_auth: Authentication
- provider: State management
- go_router: Navigation
- shared_preferences: Local storage
- flutter_dotenv: Environment variables
- fl_chart: Charts and graphs
- google_maps_flutter: Maps integration
- ming_cute_icons: Icon library
// Toggle theme
Provider.of<ThemeProvider>(context, listen: false).toggleTheme();
// Access theme colors
final color = AppColors.getPrimary(Theme.of(context).brightness);Icon(AppIcons.home)
Icon(AppIcons.settingsFilled)// Text Field
AppTextField(
label: 'Email',
hint: 'Enter your email',
validator: (value) => value?.isEmpty ?? true ? 'Required' : null,
)
// Button
AppButton(
text: 'Submit',
type: AppButtonType.primary,
onPressed: () {},
)
// Dialog
AppDialog(
title: 'Confirm',
message: 'Are you sure?',
onConfirm: () {},
)// Navigate using GoRouter
context.go(AppRoutes.home);
// Or use the router directly
AppRouter.router.go('/home');flutter test# Android
flutter build apk --release
# iOS
flutter build ios --release
# Web
flutter build web --release- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
For issues, questions, or contributions, please open an issue on the repository.
- Flutter team for the amazing framework
- Firebase for backend services
- All the package maintainers for their excellent work