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

Issues
  • 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
  • iOS Build Fix

    iOS Build Fix

    fixes building for iOS by only using FlutterDisplayMode on Android

    opened by tylersavery 0
Releases(v0.0.3+1)
Owner
Andreas Feichtinger
23 year old developer from Austria. Web • Mobile • Backend • Design
Andreas Feichtinger
A Boilerplate Project which adopts the concept of Clean Architecture and Modularization.

Flutter-Works Boilerplate Table Of Content Overview Getting Started Requirement Setup Setup Firebase Android IOS Change Package Name Running/Debugger

KodingWorks 32 Jan 14, 2022
Persist data with Flutter's Hive NoSQL Database locally on Android, iOS & Web.

Flutter Tutorial - Hive NoSQL Database Persist data with Flutter's Hive NoSQL Database locally on Android, iOS & Web. ✌  Preview App Preview Course Pr

Johannes Milke 34 Jan 7, 2022
A starter kit for beginner learns with Bloc pattern, RxDart, sqflite, Fluro and Dio to architect a flutter project. This starter kit build an App Store app as a example

Flutter Starter Kit - App Store Example A starter kit for beginner learns with Bloc pattern, RxDart, sqflite, Fluro and Dio to architect a flutter pro

kw101 606 Jan 16, 2022
This repo is a boilerplate to create flutter application easily. It is based on **GetX**.

flutter-app boilerplate This repo is a boilerplate to create flutter application easily. It is based on GetX. More info about GetX here. The app has b

NEWWAVE SOLUTIONS JSC 19 Jan 7, 2022
App HTTP Client is a wrapper around the HTTP library Dio to make network requests and error handling simpler, more predictable, and less verbose.

App HTTP Client App HTTP Client is a wrapper around the HTTP library Dio to make network requests and error handling simpler, more predictable, and le

Joanna May 29 Dec 20, 2021
A News App in Flutter using the newsapi.org API and using Bloc.

flutter_newsapp A News App using API from newsapi.org and using Bloc. Working ⚡ Screenshots =>=> ⚡ video Before Running Replace the <API_KEY> in lib/r

Arunoday kumar 10 Nov 27, 2021
An open source flutter ride-hailing app for learning purpose(Provider & Bloc)

citycab An open source ride hailing app with flutter. Getting Started This project is a starting point for a Flutter application. A few resources to g

Paul Edeme'kong - Flutter Fairy 42 Jan 10, 2022
Codeflow 18 Dec 8, 2021
Garreta project using Flutter and GetX

garreta A new Flutter project. Getting Started This project is a starting point for a Flutter application. A few resources to get you started if this

Seea 3 Jun 3, 2021
Project demonstrates building a simple chat application using Flutter framework and Firebase cloud

Flutter Chat on Firebase Project demonstrates building a simple chat application using Flutter framework and Firebase cloud. App does not poll for new

Sukitha Udugamasooriya 7 Aug 14, 2021
A Flutter project of book app UI

Book App Flutter A Flutter project of book app UI from prototype originally by Travis. Video Tutorial You can find the video tutorial of this project

Ardiansyah Putra 302 Jan 11, 2022
This project is a starting point for a Flutter application.

calculadora A new Flutter project. Getting Started This project is a starting point for a Flutter application. A few resources to get you started if t

Fernando 13 Nov 8, 2021
A collection of Animations that aims to improve the user experience for your next flutter project.

Flutter Animations A collection of Animations that aims to improve the user experience for your next flutter project. Built by Ezaldeen SAHB I hope th

Ezaldeen Sahb 116 Jan 7, 2022
A simple flutter workshop project

workshop A new Flutter project. Getting Started This project is a starting point for a Flutter application. A few resources to get you started if this

Marcelo Esser 3 Jun 13, 2021
This is the base project for flutter programers.

flutter_code_base A Base code for new flutter project. Use many modern codes and packages that can help you build your own project really fast and eff

null 72 Oct 9, 2021
This is template toolkit fasten your project setup within a minute. The toolkit is based on MVC+S structure.

BWeird Flutter Toolkit! Hi! From a Weirder Flutter has been great on mobile development and I took this opportunity to make it even greater with templ

Setak Varaman !!!! 6 Aug 22, 2021
Built for ADA project

ADA Project Learn, visualize and play around some of the popular multimedia compression/encoding algorithm, right from your smartphone. Built by: Madh

Madhavendra Pratap Singh 3 May 12, 2021
Find The Latest trending and upcoming movies and tv shows with MovieDB app. The app contains all info about movies and tv shows. find similar movies or shows, Browse all genres, video trailers, backdrops, logos, and posters.

MovieDB App Features. Dynamic Theming Search Functionality Onboarding-Screen Select favourite movie Home Screen Tranding movie Movies different catego

Ansh rathod 31 Jan 1, 2022