bizz84 / simple_auth_comparison_flutter

Flutter State Management Comparison: [ setState ❖ BLoC ❖ ValueNotifier ❖ Provider ]

Home Page:https://codewithandrea.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

State Management Comparison: Authentication Flow

This sample app shows different approaches to managing state in Flutter:

Use case: Setting a loading state while an authentication request is in progress

YouTube video walkthrough

Flutter State Management: setState, BLoC, ValueNotifier, Provider

Also published as an article here.

Preview

Overview

Flutter offers various state management approaches.

This project implements a simple use case with different techniques. A Drawer menu can be used to switch between them.

This serves both as an introduction and a comparison of different approaches.

Currently supported

  • vanilla (basic implementation without loading state)
  • setState
  • BLoC with Provider
  • ValueNotifier with Provider

Running the project with Firebase

To use this project with Firebase authentication, some configuration steps are required.

  • Create a new project with the Firebase console.
  • Add iOS and Android apps in the Firebase project settings.
  • On Android, use com.codingwithflutter.simple_auth_comparison_flutter as the package name.
  • then, download and copy google-services.json into android/app
  • On iOS, use com.codingwithflutter.simpleAuthComparisonFlutter as the bundle ID
  • then, download and copy GoogleService-Info.plist into iOS/Runner, and add it to the Runner target in Xcode

References


All the state management techniques used in this project are explained in great detail, and implemented step-by-step in my Flutter & Firebase Udemy course.

This is available for early access at this link (discount code included):

About

Flutter State Management Comparison: [ setState ❖ BLoC ❖ ValueNotifier ❖ Provider ]

https://codewithandrea.com/

License:MIT License


Languages

Language:Dart 88.9%Language:Ruby 7.3%Language:Objective-C 2.5%Language:Java 1.3%