Skip to content

cbonello/flutter_Starter_App

Repository files navigation

Flutter Starter App (BLoC pattern)

build codecov License: MIT

A Flutter starter project that contains splash, sign in, sign up, password reset and email verification. it uses Firebase for authentication and the BLoC pattern (flutter_bloc library) for state management.

Project was only tested on Android and the web (online demo).

Features

  • Sign In (email + password or Google Sign-In).
  • Sign Up.
  • Password reset.
  • Email verification.
  • Firebase Analytics.
  • Flutter web support.

Setup

lib/src/configuration.dart allows you to quickly enable/disable options.

  • kUseGoogleASignIn: Google Sign-In; not supported for Flutter web as of now.
  • kUseFirebaseAnalytics: Firebase Analytics; not supported for Flutter web as of now.
  • kUseFlutterBlocObserver: Flutter_bloc oberver.

Steps

  1. Create a Firebase project in the Firebase Console and add an Android app to the project. Please follow the installation instructions from the Firebase Auth package.
  2. In the Firebase console, enable Email/Password authentication by doing: Authentication > SIGN-IN METHOD > Email/Password > Enable > SAVE
  3. In the Firebase console, enable Google authentication by doing: Authentication > SIGN-IN METHOD > Google > Enable > SAVE
  4. In the Firebase console, update the email address verification template by doing: Authentication > TEMPLATES > Email address verification
  5. In the Firebase console, update the password reset template by doing: Authentication > TEMPLATES > Password reset

Additional Steps for Flutter Web

Important: You need the latest version of the Flutter SDK from the beta channel to compile this project. See Building a web application with Flutter.

  1. Add web support by running (restart your IDE aftert running the command):
flutter config --enable-web
  1. Rename web/SAMPLE_firebase.js as web/firebase.js and update its content with the Firebase SDK snippet from the Firebase Console (see Resources).
  2. Follow the instructions from google_sign_in_web README and include your OAuth ID to web/index.html, line 42.
  3. Check this stackoverflow thread if you encounter the “Browser or app may not be secure. Try using a different browser.” error with Google Sign-In.

Resources

Screenshots

Sign In Screen Sign Up Screen
Sign In Screen Sign Up Screen
Password Reset Screen Home Screen
Sign In Screen Sign Up Screen

Learn More on Flutter

Here are a few resources to get you started if you are new to Flutter:

General Resources

Created & Maintained by

Christophe Bonello (LinkedIn) (Twitter)

Contribution Guidelines

This project is a fully open source project, and contributions are welcome.

License

Copyright (c) 2020 Christophe Bonello

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

About

Flutter starter app providing sign-up, sign-in and sign-out functionnalities. Android, Flutter web and BLoC for state management.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published