A flutter boilerplate project containing bloc, pedantic, hive, easy_translations and more!

Overview

Flutter Production Boilerplate

A flutter project containing bloc, flutter_lints, hive, easy_translations and more!

This repository is the starting point for my personal projects. If you have any suggestions or improvements feel free to let me know. The project strives to implement best practices recommended by Google and other developers. These best practices include but are not limited to:

  • Using BLOC & Cubit for state management.
  • Using Flutter Lints for stricter linting rules.
  • Using Hive for platform independent storage that also works for web.
  • Project structure, const constructors, extracted widgets and many more...

Installation

This repository requires Flutter to be installed and present in your development environment.

Clone the project and enter the project folder.

git clone https://github.com/anfeichtinger/flutter_production_boilerplate.git
cd flutter_production_boilerplate

You can remove the screenshots located in assets/img/.

Get the dependencies.

flutter pub get

Run the app via command line or through your development environment. (optional)

flutter run lib/main.dart

Pub packages

This repository makes use of the following pub packages:

Package Version Usage
Bloc ^7.0.0 State management*
Flutter Bloc ^7.0.1 State management*
Hydrated Bloc ^7.0.1 Persists Bloc state with Hive
Equatable ^2.0.2 Easily compare custom classes, used for Bloc states*
Flutter Lints ^1.0.3 Stricter linting rules
Path Provider ^2.0.2 Get the save path for Hive
Flutter Displaymode ^0.3.2 Support high refresh rate displays
Easy Localization ^3.0.0 Makes localization easy
Hive ^2.0.4 Platform independent storage.
Url Launcher ^6.0.6 Open urls in Browser
Ionicons ^0.1.2 Modern icon library

* Recommended to keep regardless of your project

Using this package as a starting point

After following the installation steps you can customize your project. The screens and widgets that are inside the project can be easily replaced or removed. They are supposed to give the user a basic understanding of the relations between widgets and some good practices. The code includes some comments with documentation and examples. The examples can be found by searching for "Example:" inside the project files.

Changing the package and app name

You can follow the instructions in this Stackoverflow issue.

Theme

You can customize your brand colors in the lib/config/theme.dart file. The project useses colors from TailwindCSS. As primary swatch the indigo color palette is used while for the text the gray color palette is used. Feel free to replace those values with your own. In order to get a smooth transition for the text colors it is necessary to override each text type in the TextTheme.

Removing unwanted packages

If a package is not listed, then removing it from pubspec.yaml as well as all imports and uses should be enough. This is required for removing every packages, the following instructions are an addition to that.

Flutter Lints

Delete the analysis_options.yaml file. As an alternative you can modify the rules in this file or use a different package like Lint.

Easy Localization

Remove the assets/translations folder. Go to ios/Runner/Info.plist and remove the following code:

<key>CFBundleLocalizations</key>
<array>
	<string>en</string>
   	<string>de</string>
</array>

Url Launcher

For iOS go to ios/Runner/Info.plist and remove the following code:

<key>LSApplicationQueriesSchemes</key>
<array>
  <string>https</string>
  <string>http</string>
</array>

For Android you can take a look at this Stackoverflow issue for more information. Go to android/app/src/AndroidManifest.xml and remove the following code:

<queries>
     <intent>
        <action android:name="android.intent.action.VIEW" />
        <data android:scheme="https" />
    </intent>
</queries>

Screenshots

Light Theme

Home Light Info Light
Home Light Info Light

Dark Theme

Home Dark German Info Dark German
Home Dark Info Dark

License

MIT

You might also like...

Udemy Course "Dart and Flutter: The Complete Developer's Guide" Project. (With Hive DB)

Udemy-Course-Flutter Udemy Course "Dart and Flutter: The Complete Developer's Guide" Project. (With Hive DB) The course: https://www.udemy.com/course/

Jun 11, 2022

A lightweight flutter package to linkify texts containing urls, emails and hashtags

A lightweight flutter package to linkify texts containing urls, emails and hashtags

linkfy_text A lightweight flutter package to linkify texts containing urls, emails and hashtags. Usage To use this package, add linkfy_text as a depen

Nov 23, 2022

Doctor Consultation App in Flutter containing splash screen on boarding screen Routing state management Dash board Bottom navigation Decorated Drawer and Doctors Screen in the last.

Doctor Consultation App in Flutter containing splash screen on boarding screen  Routing  state management Dash board Bottom navigation Decorated Drawer and Doctors Screen in the last.

Online doctor Consultation App UI in Flutter Doctor Consultation App UI in Flutter Visit Website Features State Management Navigation Bar Responsive D

Jan 1, 2023

Flutter widget library containing buttons for authenticating with popular social networks: Apple, Google, Facebook, Twitter and Microsoft.

Flutter widget library containing buttons for authenticating with popular social networks: Apple, Google, Facebook, Twitter and Microsoft.

Flutter Auth Buttons This library is now in maintenance mode I'm no longer actively using Flutter and don't have the time to keep this library maintai

Nov 3, 2022

A package containing different kinds of services and utilities.

TODO: Put a short description of the package here that helps potential users know whether this package might be useful for them. Features TODO: List w

Nov 26, 2021

Repository containing source code for the tutorials made using with flutter

Repository containing source code for the tutorials made using with flutter

Flutter Tutorials Repository Containing Source code for tutorials found here: https://petercoding.com Note: Don't forgot to run pub get or just open p

Dec 9, 2022

A Flutter package containing widgets created by GroovinChip.

A Flutter package containing widgets created by GroovinChip.

A Flutter package containing widgets and utilities created and edited by GroovinChip. This package currently contains the following widgets: ModalDraw

Oct 17, 2022

Repository containing source code for the tutorials made using firebase with flutter

Repository containing source code for the tutorials made using firebase with flutter

Firebase-Flutter Tutorials Repository Containing Source code for tutorials found here: https://petercoding.com Note: Don't forgot to run pub get or ju

Dec 21, 2022
Comments
  • status bar color is not change in dark mode

    status bar color is not change in dark mode

    WhatsApp Image 2021-06-20 at 12 10 12 AM

    ` class MyApp extends StatelessWidget { @override Widget build(BuildContext context) { return MaterialApp( title: 'Flutter Demo', debugShowCheckedModeBanner: false, darkTheme: AppThemes.darkTheme, theme: AppThemes.lightTheme, themeMode: ThemeMode.system, home: Wrapper(), builder: EasyLoading.init(), ); } }

    `

    help wanted 
    opened by Prashant4900 5
Releases(v0.0.6+1)
Owner
Andreas Feichtinger
23 year old developer from Austria. Web • Mobile • Backend • Design
Andreas Feichtinger
An opinionated, community-driven set of lint rules for Dart and Flutter projects. Like pedantic but stricter

Lint for Dart/Flutter lint is a hand-picked, open-source, community-driven collection of lint rules for Dart and Flutter projects. The set of rules fo

Pascal Welsch 257 Jan 3, 2023
Local data hive - Local data hive for flutter

local_data_hive A new Flutter application. ScreenShot

Mehmet Emre ÖZ 0 Jan 8, 2022
Hive Wait provide a Hive repository to calling methods in the box as async.

Hive Wait provide a Hive repository to calling methods in the box as async.

Giáo Hồ 1 May 10, 2022
Flutter boilerplate - A boilerplate project created in flutter using MobX and Provider

Boilerplate Project A boilerplate project created in flutter using MobX and Prov

Wali Khan 0 Jan 22, 2022
A Flutter repo with a ready-to-go architecture containing flavors, bloc, device settings, json serialization and connectivity

Flutter Ready to Go A Flutter repo with a ready-to-go architecture containing flavors, bloc, device settings, json serialization and connectivity. Why

null 139 Nov 11, 2022
Weather app using Bloc architecture pattern & generic HTTP client with interface implementation and much more for more detail read Readme

weather Weather application for current weather, hourly forecast for 48 hours, Daily forecast for 7 days and national weather alerts. How to Run Insta

Jibran Ahmed SiddiQui 9 Oct 29, 2022
Petrus Nguyễn Thái Học 193 Dec 29, 2022
Flutter project containing all my flutter UI challenges

My Flutter Challenges A new Flutter project containing all my flutter UI challenges. How to get the code? You just click on the title of each challeng

Pedro Massango 891 Jan 3, 2023
Flutter boilerplate: support Android, iOS, Web, Mac, Linux, Window with bloc(cubit) state management

Flutter boilerplate: support Android, iOS, Web, Mac, Linux, Window with bloc(cubit) state management, dynamic theme, localization, environment (.env), logger, navigation (go_router), responsiveness (mobile, tablet, desktop), lint, unit/widget/integration test and more ...

Bumbii Co., Ltd 34 Dec 29, 2022
Flutter boilerplate: support Android, iOS, Web, Mac, Linux, Window with bloc(cubit)

Flutter boilerplate: support Android, iOS, Web, Mac, Linux, Window with bloc(cubit) state management, dynamic theme, localization, environment (.env), logger, navigation (go_router), responsiveness (mobile, tablet, desktop), lint, and unit/integration test.

Bumbii Co., Ltd 34 Dec 29, 2022