State Management the Flutter Way

The goal for this app is to learn how to do things the Flutter way. You canlearn to implement the same features in a different way in the Redux / Firebasesection, but this is how you'd do it with out any extra libraries. You'll learnhow to leverage all the things that Flutter and Dart give us out of the box to make big beautifulapplications.

1: A Bare Minimum App to Start

  • In your terminal:
  1. git clone https://github.com/ericwindmill/flutter_by_example_apps.git
  2. cd flutter_by_example_apps/blank_flutter_app
  3. flutter packages get
  4. flutter run

This is an app with a blank screen. But it runs. This is what you should see:

blank_flutter_app screen shot

Very blank.

2. Integrate Firebase Auth

Next, it's time to add auth via Firebase, as well as Firestore database whileyou're at it.

Firebase is collection of tools that app developers can use to solve'boilerplate' problems. The biggest of which are user authentication and a real-time database.

Firebase is especially appealing in Flutter apps because its another Google product, which means you can bet it'llalways be compatible, regardless of dependencies and upgrades.

Adding Firebase functionality to your application is one of the few times that you'll actually have to explore outside your Flutter app's lib folder, and add some low level configurations.

There is no way that I could write a more in-depth walk-through to setting upFirebase than the people at Google themselves could, so I'm going to send you to this Codelab about adding Firebase to your app

For the purpose of this tutorial, you should do Step 5 and half of Step 6. Stop when you get the heading 'Add Google Sign-In to Friendlychat'.