Flutter firebase starter project

Overview

Flutter Firebase Starter project

Made with πŸ’“ from Nepal

A project you can clone to build your next project with Flutter with Firebase services.

What Firebase features are implemented?

  1. Firebase Authentication
    • Email based sign up/in
    • Google Sign in
  2. Cloud Firestore
  3. Firebase Messaging
  4. Firebase analytics
    • Properly track screen names
    • Ability to track custom events
    • Properly set userid and user properties
  5. Firebase Crashlytics
  6. Remote Config
  7. Provider State management
  8. Firebase Storage

What other features are provided?

  1. Localization ready
  2. Flavors for Dev and Prod environment (can use different firebase projects based on flavor)
  3. Google Fonts
  4. Image picker
  5. Image cropper
  6. Device info (saved in user's profile)
  7. Package info
  8. Flutter Auth buttons
  9. User's profile management
  10. Android release signing config

Getting Started

How to start your project based on this.

  1. Clone this repository locally. The folder structure is somewhat based on clean code architecture

  2. Delete .git folder to clear git history

  3. Using change_app_package_name package change the package name to whatever you want your package name to be

  4. For changing iOS package name use the text editors Find and Replace in whole project folder where you need to find com.popupbits.firebasestarter and with the package name you want

  5. Using the same Find and replace in whole project folder search for firebasestarter (package name for dart/flutter project) and replace it with your own suitable name. (check the flutter package naming standards for acceptable format)

  6. Using the same Find and replace in whole project folder search for Firebase Starter (display name, launcher name) and replace it with your own suitable name for your app

  7. Copy google-services.json for dev firebase project in android/app/src/dev/ and prod firebase project in android/app/src/prod/

  8. Copy GoogleService-Info.plist for dev firebase project in ios/Runner/firebase/dev/ and prod firebase project in ios/Runner/firebase/prod

  9. For android signing, modify android/key.properties with your signing details and replace keys/keystore.jks with your own keystore or provide different location in android/key.properties for your keystore

  10. For google sign in to work copy value of REVERSED_CLIENT_ID from appropriate (dev, prod) GoogleService-Info.plist and paste in Xcode->Target Runner->Build Settings tab -> GSI_CLIENT_ID user defined variable. Value for Debug-dev and Release-dev configuration should be the one from dev GoogleService-Info.plist and rest should be from prod GoogleService-Info.plist

  11. For push notifications to work on iOS, you need to follow following two steps as described in firebase_messaging iOS integration section

    • Generate the certificates required by Apple for receiving push notifications following this guide in the Firebase docs. You can skip the section titled "Create the Provisioning Profile".
    • Follow the steps in the "Upload your APNs certificate" section of the Firebase docs.

Adding new Locale

  1. Install localizely plugin for your IDE(VS Code or Android Studio)
  2. For VS code use the command Flutter Intl: Add locale to add new locale,
  3. For android studio, goto Tools | Flutter Intl menu and find Add Locale command.
  4. This will generated the required arb file. You just need to update it with your key-value pairs
  5. Also check the documentation of the respective tools

Contribution

Contribution (suggestions, issues, feature request, pull requests) are highly welcome. Also looking for help in making it testable by adding unit, widget and integration tests.

Comments
  • Code needs updating to latest Dart and Flutter

    Code needs updating to latest Dart and Flutter

    Receiving a bunch of deprecation warnings and errors when cloning this project, for example:

    avatar.dart:25 'overflow' is deprecated and shouldn't be used. Use clipBehavior instead. See the migration guide in flutter.dev/go/clip-behavior. This feature was deprecated after v1.22.0-12.0.pre..

    auth_dialog.dart:33 The named parameter 'child' isn't defined.

    ➜ flutter_firebase_starter git:(master) flutter doctor Doctor summary (to see all details, run flutter doctor -v): [βœ“] Flutter (Channel master, 1.22.0-10.0.pre.359, on Mac OS X 10.15.6 19G2021 x86_64, locale en-US)

    [βœ“] Android toolchain - develop for Android devices (Android SDK version 28.0.3) [βœ“] Xcode - develop for iOS and macOS (Xcode 12.0.1) [βœ“] Chrome - develop for the web [βœ“] Android Studio (version 3.6) [βœ“] IntelliJ IDEA Ultimate Edition (version 2020.2.2) [βœ“] VS Code (version 1.49.1) [βœ“] Connected device (2 available)

    β€’ No issues found! ➜ flutter_firebase_star

    opened by cliffordh 11
  • Help me understand when user gets set to unauthenticated

    Help me understand when user gets set to unauthenticated

    Hi,

    I like this starter! Trying to understand the logic around user sign in. Currently it looks like the only time the user status is set to unauthenticated during initial app launch (instead of uninitialized) is here (https://github.com/lohanidamodar/flutter_firebase_starter/blob/3250f4457718af77c72938b7855e226163586b00/lib/features/auth/data/model/user_repository.dart#L110).

    This runs inside as a result of _auth.onAuthStateChanged.listen(_onAuthStateChanged);

    It seems like if this does not trigger an initial call to _onAuthStateChanged, the app will just sit at the splash screen because it is still uninitialized. Is this correct and is there any guarantee that it will call _onAuthStateChanged to start out?

    opened by dannnnthemannnn 3
  • User management \ roles

    User management \ roles

    Hello. Thank you very, very much for your work. This is a very good start for beginners and those who are just starting to learn Flutter like me. I want to ask you how can I make authorization for user types: user, manager, admin? I only found heavily outdated data that doesn't support the current version of Dart and Flutter. And how to make sure that the authorized user remains in the system on subsequent launches of the application? Thank you. Best regards, Dmitry

    opened by ferrumzp 2
  • debug banner still on the release

    debug banner still on the release

    Hey there, Really sleek and amazing boilerplate and starter, it helped me started in no time. :)

    But I am seeing a small issue. After flutter build apk --flavor prod building when I installed the apk on my phone it still has the debug banner on. Any idea why? How do we fix it?

    opened by subhendukundu 2
  • Updating dependencies

    Updating dependencies

    Hi,

    thank you for your excellent starter template. Unfortunately, I have problems resolving the dependencies or updating the packages. Especially with the Firebase packages, there are now many improvements. Can you provide an updated version?

    Because firebase_auth >=0.18.4 <=0.18.4 depends on firebase_auth_web ^0.3.2+2 and firebase_auth ^0.18.4+1 depends on firebase_auth_web ^0.3.2+3, firebase_auth ^0.18.4 requires firebase_auth_web ^0.3.2+2. And because no versions of firebase_auth match >0.18.3+1 <0.18.4 and firebase_auth 0.18.3+1 depends on firebase_auth_web ^0.3.2+1, firebase_auth ^0.18.3+1 requires firebase_auth_web ^0.3.2+1. And because firebase_auth_web >=0.3.0-dev.1 <0.4.0-1.0.nullsafety.0 depends on intl ^0.16.1 and every version of flutter_localizations from sdk depends on intl 0.17.0, firebase_auth ^0.18.3+1 is incompatible with flutter_localizations from sdk. So, because firebasestarter depends on both flutter_localizations any from sdk and firebase_auth ^0.18.3+1, version solving failed. pub get failed (1; So, because firebasestarter depends on both flutter_localizations any from sdk and firebase_auth ^0.18.3+1, version solving failed.) Process finished with exit code 1

    Easy upgrading to all current or dev versions of all packages is not successful.

    Best regards

    opened by andrevmann 3
  • Support for

    Support for "Sign in with Apple"

    https://developer.apple.com/app-store/review/guidelines/#sign-in-with-apple

    Apps that use a third-party or social login service (such as Facebook Login, Google Sign-In, Sign in with Twitter, Sign In with LinkedIn, Login with Amazon, or WeChat Login) to set up or authenticate the user’s primary account with the app must also offer Sign in with Apple as an equivalent option.

    enhancement 
    opened by alexodus 2
Owner
Damodar Lohani
Tech Consultant | Open source enthusiast | ❀ Flutter | Full stack Developer
Damodar Lohani
Flutter firebase starter project

Flutter Firebase Starter project Made with ?? from Nepal A project you can clone to build your next project with Flutter with Firebase services. What

Damodar Lohani 262 Dec 29, 2022
Flutter starter - GetX Flutter Firebase Auth Example

GetX Flutter Firebase Auth Example UPDATE: Version 2.0.0 Changed to new language

Jeff McMorris 393 Jan 5, 2023
A simple flutter starter with firebase & getX

Flutter starter GetX simplify & optimise a lot how to use Flutter! You should read a bit about GetX and Firebase. Package used Firebase (firebase_core

Guillaume Huard Hughes 4 Jun 9, 2022
Starter code for the Dicee project in the Complete Flutter Bootcamp

Dicee ?? Our Goal The objective of this tutorial is to introduce you to the core programming concepts that will form the foundation of most of the app

London App Brewery 190 Dec 31, 2022
Starter code for the Clima Project from the Complete Flutter Development Bootcamp

Clima ☁ Our Goal The objective of this tutorial is to learn about asynchronous programming in Dart. We'll look at how to carry out time consuming task

London App Brewery 141 Dec 10, 2022
Project-x2 - A Flutter E-Commerce starter template that bootstraps development of your mobile application

Flutter E-Commerce UI KIT A powerful Flutter E-Commerce starter template that bo

null 1 Apr 7, 2022
Flutterstarterproject - Clean Architecture Flutter starter project, using tdd + bloc

Flutter Starter Project Generated by the Nero Lab CLI ?? A Nero Lab Project crea

Muhammad Noerhidayatullah 12 Dec 8, 2022
Flutter starter project - boilerPlate for Clean Architecture with Domain-Driven-Design with commonly used dependencies

flutter_starter_project A new Flutter project. Getting Started This project is a starting point for a Flutter application. A few resources to get you

MJ Montes 0 Jan 2, 2022
Starter project for Flutter plugins willing to access native and synchronous rust code using FFI

Flutter Rust FFI Template This project is a Flutter Plugin template. It provides out-of-the box support for cross-compiling native Rust code for all a

JΓΈrβˆ‚Β‘ 561 Dec 7, 2022
Flutter course chatapp - A Flutter Course Chat App Starter

flutter_course_chat_app_starter Getting Started Firebase installations 1- Open F

Dhari 0 Jan 5, 2022
Starter app for Flutter that includes many different production app features; some not typically included in demo apps.

first_app: Starter app for a Flutter production app Maintainer: Greger Wedel, https://github.com/gregertw Listed on: Latest build and artifacts: ** La

Greger Teigre Wedel 371 Dec 28, 2022
Readky is a Free Flutter News App Starter Template that can help you develop a News application much faster.

Readky. Introduction Readky is a Free Flutter News App Starter Template that can help you develop a News application much faster. You just need to add

Muhammad Rezky Sulihin 54 Nov 26, 2022
Flutter starter template for production applications with a REST backend

Flutter Boilerplate My Flutter starter template for production applications with a REST backend. The main aim of this template is to get you up and ru

Ali Behzadian Nejad 3 Apr 13, 2022
Hungry is a Free Flutter Recipe App Starter Template that can help you develop a Recipe application much faster.

Hungry is a Free Flutter Recipe App Starter Template that can help you develop a Recipe application much faster. You just need to add some adjustment to the frontend and you can create your own backend.

Muhammad Rezky Sulihin 48 Dec 20, 2022
A Flutter e-commerce starter kit built using ScopedModel

Flutter E-Commerce App A Flutter e-commerce starter kit built using ScopedModel for state management that allows you to view a list of paginated produ

Rohan Taneja 126 Nov 10, 2022
A starter example of a Flutter + Mobx + Notifications

flutter-example A starter example of a Flutter + Mobx + Firebase Nofitications Before Debug $ flutter packages pub run build_runner watch --delete-con

Jonatas Walker 10 Feb 3, 2021
A starter Flutter application for macOS that uses macos_ui

macosui_starter A starter Flutter application for macOS that uses macos_ui. ?? Prerequisites Your Flutter version should be at least 3.0 You should ha

Reuben Turner 6 Jul 29, 2022
A starter template for working with Sonr's Motor in Flutter

Motor Flutter Starter This repository serves as a template starter project for the Motor Flutter library. Getting Started This project comes pre-confi

Sonr 4 Oct 18, 2022
This repo provides a starter kit thats include Getx package.

Getx_Starter This repo provides a starter kit thats include Getx package. It includes key-value databases, sample pages, and components which they are

Okan 2 Apr 27, 2022