brandonjbjelland / flutter-boilerplate

🦅🦅Start new project with Flutter🐷

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Flutter boilerplate

Logo

Flutter Boilerplate Project

Fork this project then start you project with a lot of stuck prepare
Base project made with much ❤️ . Contains CRUD, patterns, and much more!

Report bug · Request feature

Table of contents

How to Use

  1. Download or clone this repo by using the link below:
https://github.com/j1mmyto9/flutter-boilerplate.git
  1. Go to project root and execute the following command in console to get the required dependencies:
flutter pub get 
  1. Now run the generator
flutter packages pub run build_runner build

Code Conventions

In Flutter, Modularization will be done at a file level. While building widgets, we have to make sure they stay independent and re-usable as maximum. Ideally, widgets should be easily extractable into an independent project.

Depencencies

Helper

  • logger: Small, easy to use and extensible logger which prints beautiful logs.

  • url_launcher: A Flutter plugin for launching a URL in the mobile platform. Supports iOS, Android, web, Windows, macOS, and Linux.

  • auto_route: Auto route generator, Manager router

  • get: Snackbar, Navigation, Theme, Hellper function

  • intl: This package provides internationalization and localization facilities, including message translation, plurals and genders, date/number formatting and parsing, and bidirectional text.

  • shared_preferences: Flutter plugin for reading and writing simple key-value pairs. Wraps NSUserDefaults on iOS and SharedPreferences on Android.

  • package_info

  • device_info

  • permission_handler: Permission plugin for Flutter. This plugin provides a cross-platform (iOS, Android) API to request and check permissions.

HTTP, API

  • http: A composable, Future-based library for making HTTP requests.

Flutter Fire

The official Firebase plugins for Flutter. sign_in, analytics, crashlytics, storage, firestore

State Management

State Management is still the hottest topic in Flutter Community. There are tons of choices available and it’s super intimidating for a beginner to choose one. Also, all of them have their pros and cons. So, what’s the best approach

Other favorite package

  • rxdart: RxDart adds additional capabilities to Dart Streams and StreamControllers. Using as bloc pattens

  • flutter_bloc: Widgets that make it easy to integrate blocs and cubits into Flutter. Learn more

  • RiverPod: This project can be considered as a rewrite of provider to make improvements that would be otherwise impossible.

  • Get: A simplified reactive state management solution.

  • stacked: This architecture was initially a version of MVVM.

  • get: Getx Ecosystem (State, Router, Dependency management, Theme, Utils)

  • More about state management

Flutter Gen

  • flutter_gen: The Flutter code generator for your assets, fonts, colors, … — Get rid of all String-based APIs.

Widget

Image

Other favorite package

  • DIO: A powerful Http client for Dart
  • hive, sqflite: Flutter plugin for reading and locale data

Code structure

Here is the core folder structure which flutter provides.

flutter-app/
|- android
|- ios
|- lib
|- modules
|- test

Here is the folder structure we have been using in this project

lib/
|- _dev/
  |- mock/
  |- view/
  |- widget/

|- packages/
|- src/
  |- data/
  |- services/
  |- feature/
    |- dashboard/
      |- widget/
      |- controller
      |- dashboard_screen.dart
    |- home/
    |- login/
  |- plugins/
  |- routing/
|- widgets/
  |- button/
  |- image/
  |- view/
|- main.dart
|- modules

Wiki

Checkout wiki for more info

About

🦅🦅Start new project with Flutter🐷


Languages

Language:Dart 92.0%Language:HTML 3.1%Language:Objective-C 1.4%Language:Java 1.3%Language:Ruby 1.1%Language:Shell 0.5%Language:Swift 0.3%Language:Makefile 0.2%Language:Kotlin 0.1%