Giter Site home page Giter Site logo

bizz84 / starter_architecture_flutter_firebase Goto Github PK

View Code? Open in Web Editor NEW
1.6K 61.0 440.0 1.64 MB

Time Tracking app with Flutter & Firebase

Home Page: https://codewithandrea.com/

License: MIT License

Kotlin 0.14% Ruby 4.79% Swift 1.93% Objective-C 0.04% Dart 90.48% HTML 1.91% JavaScript 0.72%
dart firebase flutter riverpod

starter_architecture_flutter_firebase's Introduction

Time Tracking app with Flutter & Firebase

A time tracking application built with Flutter & Firebase:

This is intended as a reference app based on my Riverpod Architecture.

Note: this project used to be called "Started Architecture for Flutter & Firebase" (based on this old article). As of January 2023, it follows my updated Riverpod Architecture, using the latest packages.

Flutter web preview

A Flutter web preview of the app is available here:

Features

  • Simple onboarding page
  • Full authentication flow (using email & password)
  • Jobs: users can view, create, edit, and delete their own private jobs (each job has a name and hourly rate)
  • Entries: for each job, user can view, create, edit, and delete the corresponding entries (an entry is a task with a start and end time, with an optional comment)
  • A report page that shows a daily breakdown of all jobs, hours worked and pay, along with the totals.

All the data is persisted with Firestore and is kept in sync across multiple devices.

Roadmap

  • Add missing tests
  • Stateful Nested Navigation (available since GoRouter 7.1)
  • Use controllers / notifiers consistently across the app (some code still needs to be updated)
  • Add localization
  • Use the new Firebase UI packages where useful
  • Responsive UI

This is a tentative roadmap. There is no ETA for any of the points above. This is a low priority project and I don't have much time to maintain it.

Relevant Articles

The app is based on my Flutter Riverpod architecture, which is explained in detail here:

More more info on Riverpod, read this:

Packages in use

These are the main packages used in the app:

See the pubspec.yaml file for the complete list.

Running the project with Firebase

To use this project with Firebase, follow these steps:

  • Create a new project with the Firebase console
  • Enable Firebase Authentication, along with the Email/Password Authentication Sign-in provider in the Firebase Console (Authentication > Sign-in method > Email/Password > Edit > Enable > Save)
  • Enable Cloud Firestore

Then, follow one of the two approaches below. ๐Ÿ‘‡

1. Using the CLI

Make sure you have the Firebase CLI and FlutterFire CLI installed.

Then run this on the terminal from the root of this project:

  • Run firebase login so you have access to the Firebase project you have created
  • Run flutterfire configure and follow all the steps

For more info, follow this guide:

2. Manual way (not recommended)

If you don't want to use FlutterFire CLI, follow these steps instead:

  • Register separate iOS, Android, and web apps in the Firebase project settings.
  • On Android, use com.example.starter_architecture_flutter_firebase as the package name.
  • then, download and copy google-services.json into android/app.
  • On iOS, use com.example.starterArchitectureFlutterFirebase as the bundle ID.
  • then, download and copy GoogleService-Info.plist into iOS/Runner, and add it to the Runner target in Xcode.

That's it. Have fun!

starter_architecture_flutter_firebase's People

Contributors

birchb avatar bizz84 avatar gradycsjohnson avatar yuhei159 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

starter_architecture_flutter_firebase's Issues

Bad use of Riverpod "watch" and "read"

Hi Andrea.
First, thanks for your work to the community.
I want to tell you some observations about the migration to Riverpod.

  • In some cases where you may read a Provider (on EntryPage or EditJobPage widgets for example) you have a Consumer widget arround FlatButton for use the ScopedReader. This is a bad practice, you need to use context.read(myProvider) : https://riverpod.dev/docs/concepts/reading#contextreadmyprovider
    On debug mode actually, save Jobs and add Items are failed because this (on release the assertios is not fired)

  • In the same cases, when use a ScopedReader I note you assign it the a variable called watch. I think this generate confusion between the read and watch Riverpod concepts. The reader is for read provider states, not for subscribe (watch) to a provider reactive state changes.

Regards,

How to deal with package name refactor every time a new project based in this starter is created?

Hello,

First of all, thank you so much for the good work that you have achieved with this project. It is really great.
I have a question related to how to improve the creation of starter project.

So, if I create a new project, as a user, I would like to avoid the refactor of package name every time. I see that right now probably the fastest way to deal with this is execute command flutter create again, copy/paste the code and then fix imports manually or with the super advanced technique or "search & replace" :)

So, I mean how can I eliminate the package name from following imports:

import 'package:starter_architecture_flutter_firebase/app/home/job_entries/entry_list_item.dart';
import 'package:starter_architecture_flutter_firebase/app/home/job_entries/entry_page.dart';
import 'package:starter_architecture_flutter_firebase/app/home/jobs/edit_job_page.dart';
import 'package:starter_architecture_flutter_firebase/app/home/jobs/list_items_builder.dart';
import 'package:starter_architecture_flutter_firebase/app/home/models/entry.dart';
import 'package:starter_architecture_flutter_firebase/app/home/models/job.dart';

I would like to have something similar to this:

import 'job_entries/entry_list_item.dart';
import 'entry_page.dart';
import 'edit_job_page.dart';
import 'list_items_builder.dart';
import 'entry.dart';
import 'job.dart';

I know that with exports directive we can achieve something similar but then it is a pain that we have to add each file into exports file.

What is your approach every time you have to create a new project?
Any hint?

Thanks!

add Provider "profile"

if I want to load provider "profile" from firebase after user autenticate

StreamBuilder(
stream: profileStream,
providers: [
Provider.value(value: profile),

on auth_widget_builder.dart?

Add Intro/Onboarding screen

A common feature in many apps is to have an initial onboarding screen (or sequence), that only appears on first install.

This issue is about creating a reference implementation for this feature, so that others can reuse/customize it.

Requirements

  • When the app is launched for the first time, show an onboarding screen, telling users what the app is all about
  • Once the user has dismissed the onboarding screen, write a flag to local storage so that the next time the app is started, the onboarding screen doesn't show
  • Write tests for this feature

Separate logic and UI in `EditJobPage`, `EntryPage`

Currently, EditJobPage and EntryPage are StatefulWidgets that are used to perform simple CRUD operations on the DB with some forms.

The logic for initializing the form fields and submitting the data all lives inside widget classes.

A better approach is needed to better separate concerns.

TODO

  • Update EntryPage
  • Update EditJobPage

Address bar does not show named routes in flutter web

When this app is compiled for flutter web, the only time that the top address bar changes to reflect the current page route is for the /edit-job-details page because it uses "rootNavigator:true". Using the root navigator means that the bottom bar is hidden entirely, so this is not a feasible solution for routes inside of the cupertino tabbed view.

Unfortunately this means that named routes inside of the cupertino tabbed view are effectively useless on web because they do not update the URL. It would be very helpful to show an effective solution to this problem for those of us building for flutter web!

gradle error when running

After importing and running in Android Studio it fails with the following exception

FAILURE: Build failed with an exception. Could not determine the dependencies of task ':firebase_core:compileDebugAidl'. * What went wrong: Could not determine the dependencies of task ':firebase_core:compileDebugAidl'. > Could not resolve all task dependencies for configuration ':firebase_core:debugCompileClasspath'. > Could not resolve androidx.lifecycle:lifecycle-common:{strictly 2.0.0}. Required by: project :firebase_core > Cannot find a version of 'androidx.lifecycle:lifecycle-common' that satisfies the version constraints: Dependency path 'io.flutter.plugins.firebase.core:firebase_core:1.0-SNAPSHOT' --> 'io.flutter:flutter_embedding_debug:1.0.0-92ae191c17a53144bf4d62f3863c110be08e3fd3' --> 'androidx.lifecycle:lifecycle-common:2.2.0' Constraint path 'io.flutter.plugins.firebase.core:firebase_core:1.0-SNAPSHOT' --> 'androidx.lifecycle:lifecycle-common:{strictly 2.0.0}' because of the following reason: debugRuntimeClasspath uses version 2.0.0 Dependency path 'io.flutter.plugins.firebase.core:firebase_core:1.0-SNAPSHOT' --> 'io.flutter:flutter_embedding_debug:1.0.0-92ae191c17a53144bf4d62f3863c110be08e3fd3' --> 'androidx.lifecycle:lifecycle-common-java8:2.2.0' --> 'androidx.lifecycle:lifecycle-common:2.2.0' Dependency path 'io.flutter.plugins.firebase.core:firebase_core:1.0-SNAPSHOT' --> 'io.flutter:flutter_embedding_debug:1.0.0-92ae191c17a53144bf4d62f3863c110be08e3fd3' --> 'androidx.lifecycle:lifecycle-runtime:2.2.0' --> 'androidx.lifecycle:lifecycle-common:2.2.0' Dependency path 'io.flutter.plugins.firebase.core:firebase_core:1.0-SNAPSHOT' --> 'io.flutter:flutter_embedding_debug:1.0.0-92ae191c17a53144bf4d62f3863c110be08e3fd3' --> 'androidx.fragment:fragment:1.1.0' --> 'androidx.activity:activity:1.0.0' --> 'androidx.savedstate:savedstate:1.0.0' --> 'androidx.lifecycle:lifecycle-common:2.0.0' Dependency path 'io.flutter.plugins.firebase.core:firebase_core:1.0-SNAPSHOT' --> 'io.flutter:flutter_embedding_debug:1.0.0-92ae191c17a53144bf4d62f3863c110be08e3fd3' --> 'androidx.fragment:fragment:1.1.0' --> 'androidx.loader:loader:1.0.0' --> 'androidx.lifecycle:lifecycle-livedata:2.0.0' --> 'androidx.lifecycle:lifecycle-livedata-core:2.0.0' --> 'androidx.lifecycle:lifecycle-common:2.0.0'

Could not resolve androidx.lifecycle:lifecycle-runtime:{strictly 2.0.0}.
Required by:
project :firebase_core
> Cannot find a version of 'androidx.lifecycle:lifecycle-runtime' that satisfies the version constraints:
Dependency path 'io.flutter.plugins.firebase.core:firebase_core:1.0-SNAPSHOT' --> 'io.flutter:flutter_embedding_debug:1.0.0-92ae191c17a53144bf4d62f3863c110be08e3fd3' --> 'androidx.lifecycle:lifecycle-runtime:2.2.0'
Constraint path 'io.flutter.plugins.firebase.core:firebase_core:1.0-SNAPSHOT' --> 'androidx.lifecycle:lifecycle-runtime:{strictly 2.0.0}' because of the following reason: debugRuntimeClasspath uses version 2.0.0
Dependency path 'io.flutter.plugins.firebase.core:firebase_core:1.0-SNAPSHOT' --> 'io.flutter:flutter_embedding_debug:1.0.0-92ae191c17a53144bf4d62f3863c110be08e3fd3' --> 'androidx.fragment:fragment:1.1.0' --> 'androidx.activity:activity:1.0.0' --> 'androidx.lifecycle:lifecycle-runtime:2.1.0'
Dependency path 'io.flutter.plugins.firebase.core:firebase_core:1.0-SNAPSHOT' --> 'io.flutter:flutter_embedding_debug:1.0.0-92ae191c17a53144bf4d62f3863c110be08e3fd3' --> 'androidx.fragment:fragment:1.1.0' --> 'androidx.core:core:1.1.0' --> 'androidx.lifecycle:lifecycle-runtime:2.0.0'

Could not resolve androidx.fragment:fragment:{strictly 1.0.0}.
Required by:
project :firebase_core
> Cannot find a version of 'androidx.fragment:fragment' that satisfies the version constraints:
Dependency path 'io.flutter.plugins.firebase.core:firebase_core:1.0-SNAPSHOT' --> 'io.flutter:flutter_embedding_debug:1.0.0-92ae191c17a53144bf4d62f3863c110be08e3fd3' --> 'androidx.fragment:fragment:1.1.0'
Constraint path 'io.flutter.plugins.firebase.core:firebase_core:1.0-SNAPSHOT' --> 'androidx.fragment:fragment:{strictly 1.0.0}' because of the following reason: debugRuntimeClasspath uses version 1.0.0
Dependency path 'io.flutter.plugins.firebase.core:firebase_core:1.0-SNAPSHOT' --> 'com.google.firebase:firebase-core:17.5.1' --> 'com.google.firebase:firebase-analytics:17.6.0' --> 'com.google.android.gms:play-services-measurement:17.6.0' --> 'com.google.android.gms:play-services-basement:17.0.0' --> 'androidx.fragment:fragment:1.0.0'

Could not resolve androidx.arch.core:core-common:{strictly 2.0.0}.
Required by:
project :firebase_core
> Cannot find a version of 'androidx.arch.core:core-common' that satisfies the version constraints:
Dependency path 'io.flutter.plugins.firebase.core:firebase_core:1.0-SNAPSHOT' --> 'io.flutter:flutter_embedding_debug:1.0.0-92ae191c17a53144bf4d62f3863c110be08e3fd3' --> 'androidx.lifecycle:lifecycle-runtime:2.2.0' --> 'androidx.arch.core:core-common:2.1.0'
Constraint path 'io.flutter.plugins.firebase.core:firebase_core:1.0-SNAPSHOT' --> 'androidx.arch.core:core-common:{strictly 2.0.0}' because of the following reason: debugRuntimeClasspath uses version 2.0.0
Dependency path 'io.flutter.plugins.firebase.core:firebase_core:1.0-SNAPSHOT' --> 'io.flutter:flutter_embedding_debug:1.0.0-92ae191c17a53144bf4d62f3863c110be08e3fd3' --> 'androidx.fragment:fragment:1.1.0' --> 'androidx.activity:activity:1.0.0' --> 'androidx.savedstate:savedstate:1.0.0' --> 'androidx.arch.core:core-common:2.0.1'
Dependency path 'io.flutter.plugins.firebase.core:firebase_core:1.0-SNAPSHOT' --> 'io.flutter:flutter_embedding_debug:1.0.0-92ae191c17a53144bf4d62f3863c110be08e3fd3' --> 'androidx.fragment:fragment:1.1.0' --> 'androidx.loader:loader:1.0.0' --> 'androidx.lifecycle:lifecycle-livedata:2.0.0' --> 'androidx.arch.core:core-common:2.0.0'
Dependency path 'io.flutter.plugins.firebase.core:firebase_core:1.0-SNAPSHOT' --> 'io.flutter:flutter_embedding_debug:1.0.0-92ae191c17a53144bf4d62f3863c110be08e3fd3' --> 'androidx.fragment:fragment:1.1.0' --> 'androidx.loader:loader:1.0.0' --> 'androidx.lifecycle:lifecycle-livedata:2.0.0' --> 'androidx.arch.core:core-runtime:2.0.0' --> 'androidx.arch.core:core-common:2.0.0'
Dependency path 'io.flutter.plugins.firebase.core:firebase_core:1.0-SNAPSHOT' --> 'io.flutter:flutter_embedding_debug:1.0.0-92ae191c17a53144bf4d62f3863c110be08e3fd3' --> 'androidx.fragment:fragment:1.1.0' --> 'androidx.loader:loader:1.0.0' --> 'androidx.lifecycle:lifecycle-livedata:2.0.0' --> 'androidx.lifecycle:lifecycle-livedata-core:2.0.0' --> 'androidx.arch.core:core-common:2.0.0'

Could not resolve androidx.core:core:{strictly 1.0.0}.
Required by:
project :firebase_core
> Cannot find a version of 'androidx.core:core' that satisfies the version constraints:
Dependency path 'io.flutter.plugins.firebase.core:firebase_core:1.0-SNAPSHOT' --> 'io.flutter:flutter_embedding_debug:1.0.0-92ae191c17a53144bf4d62f3863c110be08e3fd3' --> 'androidx.fragment:fragment:1.1.0' --> 'androidx.core:core:1.1.0'
Constraint path 'io.flutter.plugins.firebase.core:firebase_core:1.0-SNAPSHOT' --> 'androidx.core:core:{strictly 1.0.0}' because of the following reason: debugRuntimeClasspath uses version 1.0.0
Dependency path 'io.flutter.plugins.firebase.core:firebase_core:1.0-SNAPSHOT' --> 'io.flutter:flutter_embedding_debug:1.0.0-92ae191c17a53144bf4d62f3863c110be08e3fd3' --> 'androidx.fragment:fragment:1.1.0' --> 'androidx.activity:activity:1.0.0' --> 'androidx.core:core:1.1.0'
Dependency path 'io.flutter.plugins.firebase.core:firebase_core:1.0-SNAPSHOT' --> 'io.flutter:flutter_embedding_debug:1.0.0-92ae191c17a53144bf4d62f3863c110be08e3fd3' --> 'androidx.fragment:fragment:1.1.0' --> 'androidx.viewpager:viewpager:1.0.0' --> 'androidx.core:core:1.0.0'
Dependency path 'io.flutter.plugins.firebase.core:firebase_core:1.0-SNAPSHOT' --> 'io.flutter:flutter_embedding_debug:1.0.0-92ae191c17a53144bf4d62f3863c110be08e3fd3' --> 'androidx.fragment:fragment:1.1.0' --> 'androidx.loader:loader:1.0.0' --> 'androidx.core:core:1.0.0'
Dependency path 'io.flutter.plugins.firebase.core:firebase_core:1.0-SNAPSHOT' --> 'io.flutter:flutter_embedding_debug:1.0.0-92ae191c17a53144bf4d62f3863c110be08e3fd3' --> 'androidx.fragment:fragment:1.1.0' --> 'androidx.viewpager:viewpager:1.0.0' --> 'androidx.customview:customview:1.0.0' --> 'androidx.core:core:1.0.0'
Dependency path 'io.flutter.plugins.firebase.core:firebase_core:1.0-SNAPSHOT' --> 'com.google.firebase:firebase-core:17.5.1' --> 'com.google.firebase:firebase-analytics:17.6.0' --> 'com.google.android.gms:play-services-measurement:17.6.0' --> 'androidx.legacy:legacy-support-core-utils:1.0.0' --> 'androidx.core:core:1.0.0'
Dependency path 'io.flutter.plugins.firebase.core:firebase_core:1.0-SNAPSHOT' --> 'com.google.firebase:firebase-core:17.5.1' --> 'com.google.firebase:firebase-analytics:17.6.0' --> 'com.google.android.gms:play-services-measurement:17.6.0' --> 'com.google.android.gms:play-services-basement:17.0.0' --> 'androidx.core:core:1.0.0'
Dependency path 'io.flutter.plugins.firebase.core:firebase_core:1.0-SNAPSHOT' --> 'com.google.firebase:firebase-core:17.5.1' --> 'com.google.firebase:firebase-analytics:17.6.0' --> 'com.google.android.gms:play-services-measurement:17.6.0' --> 'com.google.android.gms:play-services-measurement-impl:17.6.0' --> 'androidx.core:core:1.0.0'

Could not resolve androidx.collection:collection:{strictly 1.0.0}.
Required by:
project :firebase_core
> Cannot find a version of 'androidx.collection:collection' that satisfies the version constraints:
Dependency path 'io.flutter.plugins.firebase.core:firebase_core:1.0-SNAPSHOT' --> 'io.flutter:flutter_embedding_debug:1.0.0-92ae191c17a53144bf4d62f3863c110be08e3fd3' --> 'androidx.fragment:fragment:1.1.0' --> 'androidx.collection:collection:1.1.0'
Constraint path 'io.flutter.plugins.firebase.core:firebase_core:1.0-SNAPSHOT' --> 'androidx.collection:collection:{strictly 1.0.0}' because of the following reason: debugRuntimeClasspath uses version 1.0.0
Dependency path 'io.flutter.plugins.firebase.core:firebase_core:1.0-SNAPSHOT' --> 'com.google.firebase:firebase-core:17.5.1' --> 'com.google.firebase:firebase-analytics:17.6.0' --> 'com.google.android.gms:play-services-measurement:17.6.0' --> 'androidx.collection:collection:1.0.0'
Dependency path 'io.flutter.plugins.firebase.core:firebase_core:1.0-SNAPSHOT' --> 'com.google.firebase:firebase-core:17.5.1' --> 'com.google.firebase:firebase-analytics:17.6.0' --> 'com.google.android.gms:play-services-measurement-sdk:17.6.0' --> 'androidx.collection:collection:1.0.0'
Dependency path 'io.flutter.plugins.firebase.core:firebase_core:1.0-SNAPSHOT' --> 'io.flutter:flutter_embedding_debug:1.0.0-92ae191c17a53144bf4d62f3863c110be08e3fd3' --> 'androidx.fragment:fragment:1.1.0' --> 'androidx.core:core:1.1.0' --> 'androidx.versionedparcelable:versionedparcelable:1.1.0' --> 'androidx.collection:collection:1.0.0'
Dependency path 'io.flutter.plugins.firebase.core:firebase_core:1.0-SNAPSHOT' --> 'io.flutter:flutter_embedding_debug:1.0.0-92ae191c17a53144bf4d62f3863c110be08e3fd3' --> 'androidx.fragment:fragment:1.1.0' --> 'androidx.core:core:1.1.0' --> 'androidx.collection:collection:1.0.0'
Dependency path 'io.flutter.plugins.firebase.core:firebase_core:1.0-SNAPSHOT' --> 'com.google.firebase:firebase-core:17.5.1' --> 'com.google.firebase:firebase-analytics:17.6.0' --> 'com.google.android.gms:play-services-measurement:17.6.0' --> 'com.google.android.gms:play-services-basement:17.0.0' --> 'androidx.collection:collection:1.0.0'
Dependency path 'io.flutter.plugins.firebase.core:firebase_core:1.0-SNAPSHOT' --> 'com.google.firebase:firebase-core:17.5.1' --> 'com.google.firebase:firebase-analytics:17.6.0' --> 'com.google.android.gms:play-services-measurement:17.6.0' --> 'com.google.android.gms:play-services-measurement-impl:17.6.0' --> 'androidx.collection:collection:1.0.0'

Could not resolve androidx.lifecycle:lifecycle-viewmodel:{strictly 2.0.0}.
Required by:
project :firebase_core
> Cannot find a version of 'androidx.lifecycle:lifecycle-viewmodel' that satisfies the version constraints:
Dependency path 'io.flutter.plugins.firebase.core:firebase_core:1.0-SNAPSHOT' --> 'io.flutter:flutter_embedding_debug:1.0.0-92ae191c17a53144bf4d62f3863c110be08e3fd3' --> 'androidx.fragment:fragment:1.1.0' --> 'androidx.lifecycle:lifecycle-viewmodel:2.0.0'
Constraint path 'io.flutter.plugins.firebase.core:firebase_core:1.0-SNAPSHOT' --> 'androidx.lifecycle:lifecycle-viewmodel:{strictly 2.0.0}' because of the following reason: debugRuntimeClasspath uses version 2.0.0
Dependency path 'io.flutter.plugins.firebase.core:firebase_core:1.0-SNAPSHOT' --> 'io.flutter:flutter_embedding_debug:1.0.0-92ae191c17a53144bf4d62f3863c110be08e3fd3' --> 'androidx.fragment:fragment:1.1.0' --> 'androidx.activity:activity:1.0.0' --> 'androidx.lifecycle:lifecycle-viewmodel:2.1.0'
Dependency path 'io.flutter.plugins.firebase.core:firebase_core:1.0-SNAPSHOT' --> 'io.flutter:flutter_embedding_debug:1.0.0-92ae191c17a53144bf4d62f3863c110be08e3fd3' --> 'androidx.fragment:fragment:1.1.0' --> 'androidx.loader:loader:1.0.0' --> 'androidx.lifecycle:lifecycle-viewmodel:2.0.0'

Could not resolve androidx.versionedparcelable:versionedparcelable:{strictly 1.0.0}.
Required by:
project :firebase_core
> Cannot find a version of 'androidx.versionedparcelable:versionedparcelable' that satisfies the version constraints:
Dependency path 'io.flutter.plugins.firebase.core:firebase_core:1.0-SNAPSHOT' --> 'io.flutter:flutter_embedding_debug:1.0.0-92ae191c17a53144bf4d62f3863c110be08e3fd3' --> 'androidx.fragment:fragment:1.1.0' --> 'androidx.core:core:1.1.0' --> 'androidx.versionedparcelable:versionedparcelable:1.1.0'
Constraint path 'io.flutter.plugins.firebase.core:firebase_core:1.0-SNAPSHOT' --> 'androidx.versionedparcelable:versionedparcelable:{strictly 1.0.0}' because of the following reason: debugRuntimeClasspath uses version 1.0.0

Could not resolve androidx.lifecycle:lifecycle-common:2.2.0.
Required by:
project :firebase_core > io.flutter:flutter_embedding_debug:1.0.0-92ae191c17a53144bf4d62f3863c110be08e3fd3
project :firebase_core > io.flutter:flutter_embedding_debug:1.0.0-92ae191c17a53144bf4d62f3863c110be08e3fd3 > androidx.lifecycle:lifecycle-common-java8:2.2.0
project :firebase_core > androidx.lifecycle:lifecycle-runtime:2.2.0
> Cannot find a version of 'androidx.lifecycle:lifecycle-common' that satisfies the version constraints:
Dependency path 'io.flutter.plugins.firebase.core:firebase_core:1.0-SNAPSHOT' --> 'io.flutter:flutter_embedding_debug:1.0.0-92ae191c17a53144bf4d62f3863c110be08e3fd3' --> 'androidx.lifecycle:lifecycle-common:2.2.0'
Constraint path 'io.flutter.plugins.firebase.core:firebase_core:1.0-SNAPSHOT' --> 'androidx.lifecycle:lifecycle-common:{strictly 2.0.0}' because of the following reason: debugRuntimeClasspath uses version 2.0.0
Dependency path 'io.flutter.plugins.firebase.core:firebase_core:1.0-SNAPSHOT' --> 'io.flutter:flutter_embedding_debug:1.0.0-92ae191c17a53144bf4d62f3863c110be08e3fd3' --> 'androidx.lifecycle:lifecycle-common-java8:2.2.0' --> 'androidx.lifecycle:lifecycle-common:2.2.0'
Dependency path 'io.flutter.plugins.firebase.core:firebase_core:1.0-SNAPSHOT' --> 'io.flutter:flutter_embedding_debug:1.0.0-92ae191c17a53144bf4d62f3863c110be08e3fd3' --> 'androidx.lifecycle:lifecycle-runtime:2.2.0' --> 'androidx.lifecycle:lifecycle-common:2.2.0'
Dependency path 'io.flutter.plugins.firebase.core:firebase_core:1.0-SNAPSHOT' --> 'io.flutter:flutter_embedding_debug:1.0.0-92ae191c17a53144bf4d62f3863c110be08e3fd3' --> 'androidx.fragment:fragment:1.1.0' --> 'androidx.activity:activity:1.0.0' --> 'androidx.savedstate:savedstate:1.0.0' --> 'androidx.lifecycle:lifecycle-common:2.0.0'
Dependency path 'io.flutter.plugins.firebase.core:firebase_core:1.0-SNAPSHOT' --> 'io.flutter:flutter_embedding_debug:1.0.0-92ae191c17a53144bf4d62f3863c110be08e3fd3' --> 'androidx.fragment:fragment:1.1.0' --> 'androidx.loader:loader:1.0.0' --> 'androidx.lifecycle:lifecycle-livedata:2.0.0' --> 'androidx.lifecycle:lifecycle-livedata-core:2.0.0' --> 'androidx.lifecycle:lifecycle-common:2.0.0'

Could not resolve androidx.lifecycle:lifecycle-runtime:2.2.0.
Required by:
project :firebase_core > io.flutter:flutter_embedding_debug:1.0.0-92ae191c17a53144bf4d62f3863c110be08e3fd3
> Cannot find a version of 'androidx.lifecycle:lifecycle-runtime' that satisfies the version constraints:
Dependency path 'io.flutter.plugins.firebase.core:firebase_core:1.0-SNAPSHOT' --> 'io.flutter:flutter_embedding_debug:1.0.0-92ae191c17a53144bf4d62f3863c110be08e3fd3' --> 'androidx.lifecycle:lifecycle-runtime:2.2.0'
Constraint path 'io.flutter.plugins.firebase.core:firebase_core:1.0-SNAPSHOT' --> 'androidx.lifecycle:lifecycle-runtime:{strictly 2.0.0}' because of the following reason: debugRuntimeClasspath uses version 2.0.0
Dependency path 'io.flutter.plugins.firebase.core:firebase_core:1.0-SNAPSHOT' --> 'io.flutter:flutter_embedding_debug:1.0.0-92ae191c17a53144bf4d62f3863c110be08e3fd3' --> 'androidx.fragment:fragment:1.1.0' --> 'androidx.activity:activity:1.0.0' --> 'androidx.lifecycle:lifecycle-runtime:2.1.0'
Dependency path 'io.flutter.plugins.firebase.core:firebase_core:1.0-SNAPSHOT' --> 'io.flutter:flutter_embedding_debug:1.0.0-92ae191c17a53144bf4d62f3863c110be08e3fd3' --> 'androidx.fragment:fragment:1.1.0' --> 'androidx.core:core:1.1.0' --> 'androidx.lifecycle:lifecycle-runtime:2.0.0'

Could not resolve androidx.fragment:fragment:1.1.0.
Required by:
project :firebase_core > io.flutter:flutter_embedding_debug:1.0.0-92ae191c17a53144bf4d62f3863c110be08e3fd3
> Cannot find a version of 'androidx.fragment:fragment' that satisfies the version constraints:
Dependency path 'io.flutter.plugins.firebase.core:firebase_core:1.0-SNAPSHOT' --> 'io.flutter:flutter_embedding_debug:1.0.0-92ae191c17a53144bf4d62f3863c110be08e3fd3' --> 'androidx.fragment:fragment:1.1.0'
Constraint path 'io.flutter.plugins.firebase.core:firebase_core:1.0-SNAPSHOT' --> 'androidx.fragment:fragment:{strictly 1.0.0}' because of the following reason: debugRuntimeClasspath uses version 1.0.0
Dependency path 'io.flutter.plugins.firebase.core:firebase_core:1.0-SNAPSHOT' --> 'com.google.firebase:firebase-core:17.5.1' --> 'com.google.firebase:firebase-analytics:17.6.0' --> 'com.google.android.gms:play-services-measurement:17.6.0' --> 'com.google.android.gms:play-services-basement:17.0.0' --> 'androidx.fragment:fragment:1.0.0'

Could not resolve androidx.arch.core:core-common:2.1.0.
Required by:
project :firebase_core > androidx.lifecycle:lifecycle-runtime:2.2.0
> Cannot find a version of 'androidx.arch.core:core-common' that satisfies the version constraints:
Dependency path 'io.flutter.plugins.firebase.core:firebase_core:1.0-SNAPSHOT' --> 'io.flutter:flutter_embedding_debug:1.0.0-92ae191c17a53144bf4d62f3863c110be08e3fd3' --> 'androidx.lifecycle:lifecycle-runtime:2.2.0' --> 'androidx.arch.core:core-common:2.1.0'
Constraint path 'io.flutter.plugins.firebase.core:firebase_core:1.0-SNAPSHOT' --> 'androidx.arch.core:core-common:{strictly 2.0.0}' because of the following reason: debugRuntimeClasspath uses version 2.0.0
Dependency path 'io.flutter.plugins.firebase.core:firebase_core:1.0-SNAPSHOT' --> 'io.flutter:flutter_embedding_debug:1.0.0-92ae191c17a53144bf4d62f3863c110be08e3fd3' --> 'androidx.fragment:fragment:1.1.0' --> 'androidx.activity:activity:1.0.0' --> 'androidx.savedstate:savedstate:1.0.0' --> 'androidx.arch.core:core-common:2.0.1'
Dependency path 'io.flutter.plugins.firebase.core:firebase_core:1.0-SNAPSHOT' --> 'io.flutter:flutter_embedding_debug:1.0.0-92ae191c17a53144bf4d62f3863c110be08e3fd3' --> 'androidx.fragment:fragment:1.1.0' --> 'androidx.loader:loader:1.0.0' --> 'androidx.lifecycle:lifecycle-livedata:2.0.0' --> 'androidx.arch.core:core-common:2.0.0'
Dependency path 'io.flutter.plugins.firebase.core:firebase_core:1.0-SNAPSHOT' --> 'io.flutter:flutter_embedding_debug:1.0.0-92ae191c17a53144bf4d62f3863c110be08e3fd3' --> 'androidx.fragment:fragment:1.1.0' --> 'androidx.loader:loader:1.0.0' --> 'androidx.lifecycle:lifecycle-livedata:2.0.0' --> 'androidx.arch.core:core-runtime:2.0.0' --> 'androidx.arch.core:core-common:2.0.0'
Dependency path 'io.flutter.plugins.firebase.core:firebase_core:1.0-SNAPSHOT' --> 'io.flutter:flutter_embedding_debug:1.0.0-92ae191c17a53144bf4d62f3863c110be08e3fd3' --> 'androidx.fragment:fragment:1.1.0' --> 'androidx.loader:loader:1.0.0' --> 'androidx.lifecycle:lifecycle-livedata:2.0.0' --> 'androidx.lifecycle:lifecycle-livedata-core:2.0.0' --> 'androidx.arch.core:core-common:2.0.0'

Could not resolve androidx.core:core:1.1.0.
Required by:
project :firebase_core > androidx.fragment:fragment:1.1.0
project :firebase_core > androidx.fragment:fragment:1.1.0 > androidx.activity:activity:1.0.0
> Cannot find a version of 'androidx.core:core' that satisfies the version constraints:
Dependency path 'io.flutter.plugins.firebase.core:firebase_core:1.0-SNAPSHOT' --> 'io.flutter:flutter_embedding_debug:1.0.0-92ae191c17a53144bf4d62f3863c110be08e3fd3' --> 'androidx.fragment:fragment:1.1.0' --> 'androidx.core:core:1.1.0'
Constraint path 'io.flutter.plugins.firebase.core:firebase_core:1.0-SNAPSHOT' --> 'androidx.core:core:{strictly 1.0.0}' because of the following reason: debugRuntimeClasspath uses version 1.0.0
Dependency path 'io.flutter.plugins.firebase.core:firebase_core:1.0-SNAPSHOT' --> 'io.flutter:flutter_embedding_debug:1.0.0-92ae191c17a53144bf4d62f3863c110be08e3fd3' --> 'androidx.fragment:fragment:1.1.0' --> 'androidx.activity:activity:1.0.0' --> 'androidx.core:core:1.1.0'
Dependency path 'io.flutter.plugins.firebase.core:firebase_core:1.0-SNAPSHOT' --> 'io.flutter:flutter_embedding_debug:1.0.0-92ae191c17a53144bf4d62f3863c110be08e3fd3' --> 'androidx.fragment:fragment:1.1.0' --> 'androidx.viewpager:viewpager:1.0.0' --> 'androidx.core:core:1.0.0'
Dependency path 'io.flutter.plugins.firebase.core:firebase_core:1.0-SNAPSHOT' --> 'io.flutter:flutter_embedding_debug:1.0.0-92ae191c17a53144bf4d62f3863c110be08e3fd3' --> 'androidx.fragment:fragment:1.1.0' --> 'androidx.loader:loader:1.0.0' --> 'androidx.core:core:1.0.0'
Dependency path 'io.flutter.plugins.firebase.core:firebase_core:1.0-SNAPSHOT' --> 'io.flutter:flutter_embedding_debug:1.0.0-92ae191c17a53144bf4d62f3863c110be08e3fd3' --> 'androidx.fragment:fragment:1.1.0' --> 'androidx.viewpager:viewpager:1.0.0' --> 'androidx.customview:customview:1.0.0' --> 'androidx.core:core:1.0.0'
Dependency path 'io.flutter.plugins.firebase.core:firebase_core:1.0-SNAPSHOT' --> 'com.google.firebase:firebase-core:17.5.1' --> 'com.google.firebase:firebase-analytics:17.6.0' --> 'com.google.android.gms:play-services-measurement:17.6.0' --> 'androidx.legacy:legacy-support-core-utils:1.0.0' --> 'androidx.core:core:1.0.0'
Dependency path 'io.flutter.plugins.firebase.core:firebase_core:1.0-SNAPSHOT' --> 'com.google.firebase:firebase-core:17.5.1' --> 'com.google.firebase:firebase-analytics:17.6.0' --> 'com.google.android.gms:play-services-measurement:17.6.0' --> 'com.google.android.gms:play-services-basement:17.0.0' --> 'androidx.core:core:1.0.0'
Dependency path 'io.flutter.plugins.firebase.core:firebase_core:1.0-SNAPSHOT' --> 'com.google.firebase:firebase-core:17.5.1' --> 'com.google.firebase:firebase-analytics:17.6.0' --> 'com.google.android.gms:play-services-measurement:17.6.0' --> 'com.google.android.gms:play-services-measurement-impl:17.6.0' --> 'androidx.core:core:1.0.0'

Could not resolve androidx.collection:collection:1.1.0.
Required by:
project :firebase_core > androidx.fragment:fragment:1.1.0
> Cannot find a version of 'androidx.collection:collection' that satisfies the version constraints:
Dependency path 'io.flutter.plugins.firebase.core:firebase_core:1.0-SNAPSHOT' --> 'io.flutter:flutter_embedding_debug:1.0.0-92ae191c17a53144bf4d62f3863c110be08e3fd3' --> 'androidx.fragment:fragment:1.1.0' --> 'androidx.collection:collection:1.1.0'
Constraint path 'io.flutter.plugins.firebase.core:firebase_core:1.0-SNAPSHOT' --> 'androidx.collection:collection:{strictly 1.0.0}' because of the following reason: debugRuntimeClasspath uses version 1.0.0
Dependency path 'io.flutter.plugins.firebase.core:firebase_core:1.0-SNAPSHOT' --> 'com.google.firebase:firebase-core:17.5.1' --> 'com.google.firebase:firebase-analytics:17.6.0' --> 'com.google.android.gms:play-services-measurement:17.6.0' --> 'androidx.collection:collection:1.0.0'
Dependency path 'io.flutter.plugins.firebase.core:firebase_core:1.0-SNAPSHOT' --> 'com.google.firebase:firebase-core:17.5.1' --> 'com.google.firebase:firebase-analytics:17.6.0' --> 'com.google.android.gms:play-services-measurement-sdk:17.6.0' --> 'androidx.collection:collection:1.0.0'
Dependency path 'io.flutter.plugins.firebase.core:firebase_core:1.0-SNAPSHOT' --> 'io.flutter:flutter_embedding_debug:1.0.0-92ae191c17a53144bf4d62f3863c110be08e3fd3' --> 'androidx.fragment:fragment:1.1.0' --> 'androidx.core:core:1.1.0' --> 'androidx.versionedparcelable:versionedparcelable:1.1.0' --> 'androidx.collection:collection:1.0.0'
Dependency path 'io.flutter.plugins.firebase.core:firebase_core:1.0-SNAPSHOT' --> 'io.flutter:flutter_embedding_debug:1.0.0-92ae191c17a53144bf4d62f3863c110be08e3fd3' --> 'androidx.fragment:fragment:1.1.0' --> 'androidx.core:core:1.1.0' --> 'androidx.collection:collection:1.0.0'
Dependency path 'io.flutter.plugins.firebase.core:firebase_core:1.0-SNAPSHOT' --> 'com.google.firebase:firebase-core:17.5.1' --> 'com.google.firebase:firebase-analytics:17.6.0' --> 'com.google.android.gms:play-services-measurement:17.6.0' --> 'com.google.android.gms:play-services-basement:17.0.0' --> 'androidx.collection:collection:1.0.0'
Dependency path 'io.flutter.plugins.firebase.core:firebase_core:1.0-SNAPSHOT' --> 'com.google.firebase:firebase-core:17.5.1' --> 'com.google.firebase:firebase-analytics:17.6.0' --> 'com.google.android.gms:play-services-measurement:17.6.0' --> 'com.google.android.gms:play-services-measurement-impl:17.6.0' --> 'androidx.collection:collection:1.0.0'

Could not resolve androidx.lifecycle:lifecycle-viewmodel:2.0.0.
Required by:
project :firebase_core > androidx.fragment:fragment:1.1.0
project :firebase_core > androidx.loader:loader:1.0.0
> Cannot find a version of 'androidx.lifecycle:lifecycle-viewmodel' that satisfies the version constraints:
Dependency path 'io.flutter.plugins.firebase.core:firebase_core:1.0-SNAPSHOT' --> 'io.flutter:flutter_embedding_debug:1.0.0-92ae191c17a53144bf4d62f3863c110be08e3fd3' --> 'androidx.fragment:fragment:1.1.0' --> 'androidx.lifecycle:lifecycle-viewmodel:2.0.0'
Constraint path 'io.flutter.plugins.firebase.core:firebase_core:1.0-SNAPSHOT' --> 'androidx.lifecycle:lifecycle-viewmodel:{strictly 2.0.0}' because of the following reason: debugRuntimeClasspath uses version 2.0.0
Dependency path 'io.flutter.plugins.firebase.core:firebase_core:1.0-SNAPSHOT' --> 'io.flutter:flutter_embedding_debug:1.0.0-92ae191c17a53144bf4d62f3863c110be08e3fd3' --> 'androidx.fragment:fragment:1.1.0' --> 'androidx.activity:activity:1.0.0' --> 'androidx.lifecycle:lifecycle-viewmodel:2.1.0'
Dependency path 'io.flutter.plugins.firebase.core:firebase_core:1.0-SNAPSHOT' --> 'io.flutter:flutter_embedding_debug:1.0.0-92ae191c17a53144bf4d62f3863c110be08e3fd3' --> 'androidx.fragment:fragment:1.1.0' --> 'androidx.loader:loader:1.0.0' --> 'androidx.lifecycle:lifecycle-viewmodel:2.0.0'

Could not resolve androidx.lifecycle:lifecycle-runtime:2.1.0.
Required by:
project :firebase_core > androidx.fragment:fragment:1.1.0 > androidx.activity:activity:1.0.0
> Cannot find a version of 'androidx.lifecycle:lifecycle-runtime' that satisfies the version constraints:
Dependency path 'io.flutter.plugins.firebase.core:firebase_core:1.0-SNAPSHOT' --> 'io.flutter:flutter_embedding_debug:1.0.0-92ae191c17a53144bf4d62f3863c110be08e3fd3' --> 'androidx.lifecycle:lifecycle-runtime:2.2.0'
Constraint path 'io.flutter.plugins.firebase.core:firebase_core:1.0-SNAPSHOT' --> 'androidx.lifecycle:lifecycle-runtime:{strictly 2.0.0}' because of the following reason: debugRuntimeClasspath uses version 2.0.0
Dependency path 'io.flutter.plugins.firebase.core:firebase_core:1.0-SNAPSHOT' --> 'io.flutter:flutter_embedding_debug:1.0.0-92ae191c17a53144bf4d62f3863c110be08e3fd3' --> 'androidx.fragment:fragment:1.1.0' --> 'androidx.activity:activity:1.0.0' --> 'androidx.lifecycle:lifecycle-runtime:2.1.0'
Dependency path 'io.flutter.plugins.firebase.core:firebase_core:1.0-SNAPSHOT' --> 'io.flutter:flutter_embedding_debug:1.0.0-92ae191c17a53144bf4d62f3863c110be08e3fd3' --> 'androidx.fragment:fragment:1.1.0' --> 'androidx.core:core:1.1.0' --> 'androidx.lifecycle:lifecycle-runtime:2.0.0'

Could not resolve androidx.lifecycle:lifecycle-viewmodel:2.1.0.
Required by:
project :firebase_core > androidx.fragment:fragment:1.1.0 > androidx.activity:activity:1.0.0
> Cannot find a version of 'androidx.lifecycle:lifecycle-viewmodel' that satisfies the version constraints:
Dependency path 'io.flutter.plugins.firebase.core:firebase_core:1.0-SNAPSHOT' --> 'io.flutter:flutter_embedding_debug:1.0.0-92ae191c17a53144bf4d62f3863c110be08e3fd3' --> 'androidx.fragment:fragment:1.1.0' --> 'androidx.lifecycle:lifecycle-viewmodel:2.0.0'
Constraint path 'io.flutter.plugins.firebase.core:firebase_core:1.0-SNAPSHOT' --> 'androidx.lifecycle:lifecycle-viewmodel:{strictly 2.0.0}' because of the following reason: debugRuntimeClasspath uses version 2.0.0
Dependency path 'io.flutter.plugins.firebase.core:firebase_core:1.0-SNAPSHOT' --> 'io.flutter:flutter_embedding_debug:1.0.0-92ae191c17a53144bf4d62f3863c110be08e3fd3' --> 'androidx.fragment:fragment:1.1.0' --> 'androidx.activity:activity:1.0.0' --> 'androidx.lifecycle:lifecycle-viewmodel:2.1.0'
Dependency path 'io.flutter.plugins.firebase.core:firebase_core:1.0-SNAPSHOT' --> 'io.flutter:flutter_embedding_debug:1.0.0-92ae191c17a53144bf4d62f3863c110be08e3fd3' --> 'androidx.fragment:fragment:1.1.0' --> 'androidx.loader:loader:1.0.0' --> 'androidx.lifecycle:lifecycle-viewmodel:2.0.0'

Could not resolve androidx.lifecycle:lifecycle-runtime:2.0.0.
Required by:
project :firebase_core > androidx.core:core:1.1.0
> Cannot find a version of 'androidx.lifecycle:lifecycle-runtime' that satisfies the version constraints:
Dependency path 'io.flutter.plugins.firebase.core:firebase_core:1.0-SNAPSHOT' --> 'io.flutter:flutter_embedding_debug:1.0.0-92ae191c17a53144bf4d62f3863c110be08e3fd3' --> 'androidx.lifecycle:lifecycle-runtime:2.2.0'
Constraint path 'io.flutter.plugins.firebase.core:firebase_core:1.0-SNAPSHOT' --> 'androidx.lifecycle:lifecycle-runtime:{strictly 2.0.0}' because of the following reason: debugRuntimeClasspath uses version 2.0.0
Dependency path 'io.flutter.plugins.firebase.core:firebase_core:1.0-SNAPSHOT' --> 'io.flutter:flutter_embedding_debug:1.0.0-92ae191c17a53144bf4d62f3863c110be08e3fd3' --> 'androidx.fragment:fragment:1.1.0' --> 'androidx.activity:activity:1.0.0' --> 'androidx.lifecycle:lifecycle-runtime:2.1.0'
Dependency path 'io.flutter.plugins.firebase.core:firebase_core:1.0-SNAPSHOT' --> 'io.flutter:flutter_embedding_debug:1.0.0-92ae191c17a53144bf4d62f3863c110be08e3fd3' --> 'androidx.fragment:fragment:1.1.0' --> 'androidx.core:core:1.1.0' --> 'androidx.lifecycle:lifecycle-runtime:2.0.0'

Could not resolve androidx.versionedparcelable:versionedparcelable:1.1.0.
Required by:
project :firebase_core > androidx.core:core:1.1.0
> Cannot find a version of 'androidx.versionedparcelable:versionedparcelable' that satisfies the version constraints:
Dependency path 'io.flutter.plugins.firebase.core:firebase_core:1.0-SNAPSHOT' --> 'io.flutter:flutter_embedding_debug:1.0.0-92ae191c17a53144bf4d62f3863c110be08e3fd3' --> 'androidx.fragment:fragment:1.1.0' --> 'androidx.core:core:1.1.0' --> 'androidx.versionedparcelable:versionedparcelable:1.1.0'
Constraint path 'io.flutter.plugins.firebase.core:firebase_core:1.0-SNAPSHOT' --> 'androidx.versionedparcelable:versionedparcelable:{strictly 1.0.0}' because of the following reason: debugRuntimeClasspath uses version 1.0.0

Could not resolve androidx.collection:collection:1.0.0.
Required by:
project :firebase_core > androidx.core:core:1.1.0
project :firebase_core > com.google.android.gms:play-services-measurement:17.6.0
project :firebase_core > com.google.android.gms:play-services-measurement-sdk:17.6.0
project :firebase_core > androidx.versionedparcelable:versionedparcelable:1.1.0
project :firebase_core > com.google.android.gms:play-services-basement:17.0.0
project :firebase_core > com.google.android.gms:play-services-measurement-impl:17.6.0
> Cannot find a version of 'androidx.collection:collection' that satisfies the version constraints:
Dependency path 'io.flutter.plugins.firebase.core:firebase_core:1.0-SNAPSHOT' --> 'io.flutter:flutter_embedding_debug:1.0.0-92ae191c17a53144bf4d62f3863c110be08e3fd3' --> 'androidx.fragment:fragment:1.1.0' --> 'androidx.collection:collection:1.1.0'
Constraint path 'io.flutter.plugins.firebase.core:firebase_core:1.0-SNAPSHOT' --> 'androidx.collection:collection:{strictly 1.0.0}' because of the following reason: debugRuntimeClasspath uses version 1.0.0
Dependency path 'io.flutter.plugins.firebase.core:firebase_core:1.0-SNAPSHOT' --> 'com.google.firebase:firebase-core:17.5.1' --> 'com.google.firebase:firebase-analytics:17.6.0' --> 'com.google.android.gms:play-services-measurement:17.6.0' --> 'androidx.collection:collection:1.0.0'
Dependency path 'io.flutter.plugins.firebase.core:firebase_core:1.0-SNAPSHOT' --> 'com.google.firebase:firebase-core:17.5.1' --> 'com.google.firebase:firebase-analytics:17.6.0' --> 'com.google.android.gms:play-services-measurement-sdk:17.6.0' --> 'androidx.collection:collection:1.0.0'
Dependency path 'io.flutter.plugins.firebase.core:firebase_core:1.0-SNAPSHOT' --> 'io.flutter:flutter_embedding_debug:1.0.0-92ae191c17a53144bf4d62f3863c110be08e3fd3' --> 'androidx.fragment:fragment:1.1.0' --> 'androidx.core:core:1.1.0' --> 'androidx.versionedparcelable:versionedparcelable:1.1.0' --> 'androidx.collection:collection:1.0.0'
Dependency path 'io.flutter.plugins.firebase.core:firebase_core:1.0-SNAPSHOT' --> 'io.flutter:flutter_embedding_debug:1.0.0-92ae191c17a53144bf4d62f3863c110be08e3fd3' --> 'androidx.fragment:fragment:1.1.0' --> 'androidx.core:core:1.1.0' --> 'androidx.collection:collection:1.0.0'
Dependency path 'io.flutter.plugins.firebase.core:firebase_core:1.0-SNAPSHOT' --> 'com.google.firebase:firebase-core:17.5.1' --> 'com.google.firebase:firebase-analytics:17.6.0' --> 'com.google.android.gms:play-services-measurement:17.6.0' --> 'com.google.android.gms:play-services-basement:17.0.0' --> 'androidx.collection:collection:1.0.0'
Dependency path 'io.flutter.plugins.firebase.core:firebase_core:1.0-SNAPSHOT' --> 'com.google.firebase:firebase-core:17.5.1' --> 'com.google.firebase:firebase-analytics:17.6.0' --> 'com.google.android.gms:play-services-measurement:17.6.0' --> 'com.google.android.gms:play-services-measurement-impl:17.6.0' --> 'androidx.collection:collection:1.0.0'

Could not resolve androidx.core:core:1.0.0.
Required by:
project :firebase_core > androidx.viewpager:viewpager:1.0.0
project :firebase_core > androidx.loader:loader:1.0.0
project :firebase_core > androidx.customview:customview:1.0.0
project :firebase_core > androidx.legacy:legacy-support-core-utils:1.0.0
project :firebase_core > com.google.android.gms:play-services-basement:17.0.0
project :firebase_core > com.google.android.gms:play-services-measurement-impl:17.6.0
> Cannot find a version of 'androidx.core:core' that satisfies the version constraints:
Dependency path 'io.flutter.plugins.firebase.core:firebase_core:1.0-SNAPSHOT' --> 'io.flutter:flutter_embedding_debug:1.0.0-92ae191c17a53144bf4d62f3863c110be08e3fd3' --> 'androidx.fragment:fragment:1.1.0' --> 'androidx.core:core:1.1.0'
Constraint path 'io.flutter.plugins.firebase.core:firebase_core:1.0-SNAPSHOT' --> 'androidx.core:core:{strictly 1.0.0}' because of the following reason: debugRuntimeClasspath uses version 1.0.0
Dependency path 'io.flutter.plugins.firebase.core:firebase_core:1.0-SNAPSHOT' --> 'io.flutter:flutter_embedding_debug:1.0.0-92ae191c17a53144bf4d62f3863c110be08e3fd3' --> 'androidx.fragment:fragment:1.1.0' --> 'androidx.activity:activity:1.0.0' --> 'androidx.core:core:1.1.0'
Dependency path 'io.flutter.plugins.firebase.core:firebase_core:1.0-SNAPSHOT' --> 'io.flutter:flutter_embedding_debug:1.0.0-92ae191c17a53144bf4d62f3863c110be08e3fd3' --> 'androidx.fragment:fragment:1.1.0' --> 'androidx.viewpager:viewpager:1.0.0' --> 'androidx.core:core:1.0.0'
Dependency path 'io.flutter.plugins.firebase.core:firebase_core:1.0-SNAPSHOT' --> 'io.flutter:flutter_embedding_debug:1.0.0-92ae191c17a53144bf4d62f3863c110be08e3fd3' --> 'androidx.fragment:fragment:1.1.0' --> 'androidx.loader:loader:1.0.0' --> 'androidx.core:core:1.0.0'
Dependency path 'io.flutter.plugins.firebase.core:firebase_core:1.0-SNAPSHOT' --> 'io.flutter:flutter_embedding_debug:1.0.0-92ae191c17a53144bf4d62f3863c110be08e3fd3' --> 'androidx.fragment:fragment:1.1.0' --> 'androidx.viewpager:viewpager:1.0.0' --> 'androidx.customview:customview:1.0.0' --> 'androidx.core:core:1.0.0'
Dependency path 'io.flutter.plugins.firebase.core:firebase_core:1.0-SNAPSHOT' --> 'com.google.firebase:firebase-core:17.5.1' --> 'com.google.firebase:firebase-analytics:17.6.0' --> 'com.google.android.gms:play-services-measurement:17.6.0' --> 'androidx.legacy:legacy-support-core-utils:1.0.0' --> 'androidx.core:core:1.0.0'
Dependency path 'io.flutter.plugins.firebase.core:firebase_core:1.0-SNAPSHOT' --> 'com.google.firebase:firebase-core:17.5.1' --> 'com.google.firebase:firebase-analytics:17.6.0' --> 'com.google.android.gms:play-services-measurement:17.6.0' --> 'com.google.android.gms:play-services-basement:17.0.0' --> 'androidx.core:core:1.0.0'
Dependency path 'io.flutter.plugins.firebase.core:firebase_core:1.0-SNAPSHOT' --> 'com.google.firebase:firebase-core:17.5.1' --> 'com.google.firebase:firebase-analytics:17.6.0' --> 'com.google.android.gms:play-services-measurement:17.6.0' --> 'com.google.android.gms:play-services-measurement-impl:17.6.0' --> 'androidx.core:core:1.0.0'

Could not resolve androidx.arch.core:core-common:2.0.1.
Required by:
project :firebase_core > androidx.fragment:fragment:1.1.0 > androidx.activity:activity:1.0.0 > androidx.savedstate:savedstate:1.0.0
> Cannot find a version of 'androidx.arch.core:core-common' that satisfies the version constraints:
Dependency path 'io.flutter.plugins.firebase.core:firebase_core:1.0-SNAPSHOT' --> 'io.flutter:flutter_embedding_debug:1.0.0-92ae191c17a53144bf4d62f3863c110be08e3fd3' --> 'androidx.lifecycle:lifecycle-runtime:2.2.0' --> 'androidx.arch.core:core-common:2.1.0'
Constraint path 'io.flutter.plugins.firebase.core:firebase_core:1.0-SNAPSHOT' --> 'androidx.arch.core:core-common:{strictly 2.0.0}' because of the following reason: debugRuntimeClasspath uses version 2.0.0
Dependency path 'io.flutter.plugins.firebase.core:firebase_core:1.0-SNAPSHOT' --> 'io.flutter:flutter_embedding_debug:1.0.0-92ae191c17a53144bf4d62f3863c110be08e3fd3' --> 'androidx.fragment:fragment:1.1.0' --> 'androidx.activity:activity:1.0.0' --> 'androidx.savedstate:savedstate:1.0.0' --> 'androidx.arch.core:core-common:2.0.1'
Dependency path 'io.flutter.plugins.firebase.core:firebase_core:1.0-SNAPSHOT' --> 'io.flutter:flutter_embedding_debug:1.0.0-92ae191c17a53144bf4d62f3863c110be08e3fd3' --> 'androidx.fragment:fragment:1.1.0' --> 'androidx.loader:loader:1.0.0' --> 'androidx.lifecycle:lifecycle-livedata:2.0.0' --> 'androidx.arch.core:core-common:2.0.0'
Dependency path 'io.flutter.plugins.firebase.core:firebase_core:1.0-SNAPSHOT' --> 'io.flutter:flutter_embedding_debug:1.0.0-92ae191c17a53144bf4d62f3863c110be08e3fd3' --> 'androidx.fragment:fragment:1.1.0' --> 'androidx.loader:loader:1.0.0' --> 'androidx.lifecycle:lifecycle-livedata:2.0.0' --> 'androidx.arch.core:core-runtime:2.0.0' --> 'androidx.arch.core:core-common:2.0.0'
Dependency path 'io.flutter.plugins.firebase.core:firebase_core:1.0-SNAPSHOT' --> 'io.flutter:flutter_embedding_debug:1.0.0-92ae191c17a53144bf4d62f3863c110be08e3fd3' --> 'androidx.fragment:fragment:1.1.0' --> 'androidx.loader:loader:1.0.0' --> 'androidx.lifecycle:lifecycle-livedata:2.0.0' --> 'androidx.lifecycle:lifecycle-livedata-core:2.0.0' --> 'androidx.arch.core:core-common:2.0.0'

Could not resolve androidx.lifecycle:lifecycle-common:2.0.0.
Required by:
project :firebase_core > androidx.fragment:fragment:1.1.0 > androidx.activity:activity:1.0.0 > androidx.savedstate:savedstate:1.0.0
project :firebase_core > androidx.lifecycle:lifecycle-livedata-core:2.0.0
> Cannot find a version of 'androidx.lifecycle:lifecycle-common' that satisfies the version constraints:
Dependency path 'io.flutter.plugins.firebase.core:firebase_core:1.0-SNAPSHOT' --> 'io.flutter:flutter_embedding_debug:1.0.0-92ae191c17a53144bf4d62f3863c110be08e3fd3' --> 'androidx.lifecycle:lifecycle-common:2.2.0'
Constraint path 'io.flutter.plugins.firebase.core:firebase_core:1.0-SNAPSHOT' --> 'androidx.lifecycle:lifecycle-common:{strictly 2.0.0}' because of the following reason: debugRuntimeClasspath uses version 2.0.0
Dependency path 'io.flutter.plugins.firebase.core:firebase_core:1.0-SNAPSHOT' --> 'io.flutter:flutter_embedding_debug:1.0.0-92ae191c17a53144bf4d62f3863c110be08e3fd3' --> 'androidx.lifecycle:lifecycle-common-java8:2.2.0' --> 'androidx.lifecycle:lifecycle-common:2.2.0'
Dependency path 'io.flutter.plugins.firebase.core:firebase_core:1.0-SNAPSHOT' --> 'io.flutter:flutter_embedding_debug:1.0.0-92ae191c17a53144bf4d62f3863c110be08e3fd3' --> 'androidx.lifecycle:lifecycle-runtime:2.2.0' --> 'androidx.lifecycle:lifecycle-common:2.2.0'
Dependency path 'io.flutter.plugins.firebase.core:firebase_core:1.0-SNAPSHOT' --> 'io.flutter:flutter_embedding_debug:1.0.0-92ae191c17a53144bf4d62f3863c110be08e3fd3' --> 'androidx.fragment:fragment:1.1.0' --> 'androidx.activity:activity:1.0.0' --> 'androidx.savedstate:savedstate:1.0.0' --> 'androidx.lifecycle:lifecycle-common:2.0.0'
Dependency path 'io.flutter.plugins.firebase.core:firebase_core:1.0-SNAPSHOT' --> 'io.flutter:flutter_embedding_debug:1.0.0-92ae191c17a53144bf4d62f3863c110be08e3fd3' --> 'androidx.fragment:fragment:1.1.0' --> 'androidx.loader:loader:1.0.0' --> 'androidx.lifecycle:lifecycle-livedata:2.0.0' --> 'androidx.lifecycle:lifecycle-livedata-core:2.0.0' --> 'androidx.lifecycle:lifecycle-common:2.0.0'

Could not resolve androidx.arch.core:core-common:2.0.0.
Required by:
project :firebase_core > androidx.lifecycle:lifecycle-livedata:2.0.0
project :firebase_core > androidx.arch.core:core-runtime:2.0.0
project :firebase_core > androidx.lifecycle:lifecycle-livedata-core:2.0.0
> Cannot find a version of 'androidx.arch.core:core-common' that satisfies the version constraints:
Dependency path 'io.flutter.plugins.firebase.core:firebase_core:1.0-SNAPSHOT' --> 'io.flutter:flutter_embedding_debug:1.0.0-92ae191c17a53144bf4d62f3863c110be08e3fd3' --> 'androidx.lifecycle:lifecycle-runtime:2.2.0' --> 'androidx.arch.core:core-common:2.1.0'
Constraint path 'io.flutter.plugins.firebase.core:firebase_core:1.0-SNAPSHOT' --> 'androidx.arch.core:core-common:{strictly 2.0.0}' because of the following reason: debugRuntimeClasspath uses version 2.0.0
Dependency path 'io.flutter.plugins.firebase.core:firebase_core:1.0-SNAPSHOT' --> 'io.flutter:flutter_embedding_debug:1.0.0-92ae191c17a53144bf4d62f3863c110be08e3fd3' --> 'androidx.fragment:fragment:1.1.0' --> 'androidx.activity:activity:1.0.0' --> 'androidx.savedstate:savedstate:1.0.0' --> 'androidx.arch.core:core-common:2.0.1'
Dependency path 'io.flutter.plugins.firebase.core:firebase_core:1.0-SNAPSHOT' --> 'io.flutter:flutter_embedding_debug:1.0.0-92ae191c17a53144bf4d62f3863c110be08e3fd3' --> 'androidx.fragment:fragment:1.1.0' --> 'androidx.loader:loader:1.0.0' --> 'androidx.lifecycle:lifecycle-livedata:2.0.0' --> 'androidx.arch.core:core-common:2.0.0'
Dependency path 'io.flutter.plugins.firebase.core:firebase_core:1.0-SNAPSHOT' --> 'io.flutter:flutter_embedding_debug:1.0.0-92ae191c17a53144bf4d62f3863c110be08e3fd3' --> 'androidx.fragment:fragment:1.1.0' --> 'androidx.loader:loader:1.0.0' --> 'androidx.lifecycle:lifecycle-livedata:2.0.0' --> 'androidx.arch.core:core-runtime:2.0.0' --> 'androidx.arch.core:core-common:2.0.0'
Dependency path 'io.flutter.plugins.firebase.core:firebase_core:1.0-SNAPSHOT' --> 'io.flutter:flutter_embedding_debug:1.0.0-92ae191c17a53144bf4d62f3863c110be08e3fd3' --> 'androidx.fragment:fragment:1.1.0' --> 'androidx.loader:loader:1.0.0' --> 'androidx.lifecycle:lifecycle-livedata:2.0.0' --> 'androidx.lifecycle:lifecycle-livedata-core:2.0.0' --> 'androidx.arch.core:core-common:2.0.0'

Could not resolve androidx.fragment:fragment:1.0.0.
Required by:
project :firebase_core > com.google.android.gms:play-services-basement:17.0.0
> Cannot find a version of 'androidx.fragment:fragment' that satisfies the version constraints:
Dependency path 'io.flutter.plugins.firebase.core:firebase_core:1.0-SNAPSHOT' --> 'io.flutter:flutter_embedding_debug:1.0.0-92ae191c17a53144bf4d62f3863c110be08e3fd3' --> 'androidx.fragment:fragment:1.1.0'
Constraint path 'io.flutter.plugins.firebase.core:firebase_core:1.0-SNAPSHOT' --> 'androidx.fragment:fragment:{strictly 1.0.0}' because of the following reason: debugRuntimeClasspath uses version 1.0.0
Dependency path 'io.flutter.plugins.firebase.core:firebase_core:1.0-SNAPSHOT' --> 'com.google.firebase:firebase-core:17.5.1' --> 'com.google.firebase:firebase-analytics:17.6.0' --> 'com.google.android.gms:play-services-measurement:17.6.0' --> 'com.google.android.gms:play-services-basement:17.0.0' --> 'androidx.fragment:fragment:1.0.0'

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

BUILD FAILED in 1s
The build failed likely due to AndroidX incompatibilities in a plugin. The tool is about to try using Jetifier to solve the incompatibility.
โœ๏ธ Creating android/settings_aar.gradle...
โœ“ android/settings_aar.gradle created successfully.
Building plugin cloud_firestore...
Running Gradle task 'assembleAarRelease'...
Exception: The plugin cloud_firestore could not be built due to the issue above.

Router Class defined in 'package:flutter/src/widgets/router.dart' and 'package:starter_architecture_flutter_firebase/routing/router.dart'.

Seems the flutter widgets also are using a class named Router which leads to a Problem.

The name 'Router' is defined in the libraries 'package:flutter/src/widgets/router.dart' and 'package:starter_architecture_flutter_firebase/routing/router.dart'.

I fixed it by doing
import 'package:starter_architecture_flutter_firebase/routing/router.dart' as start_router;

and in the code:
onGenerateRoute: start_router.Router.onGenerateRoute,

When I click the register button, i get:
Error: Could not find a generator for route RouteSettings("/email-password-sign-in-page", Closure: () => void from: () => navigator.pop(ObjectL())) in the _WidgetsAppState.

Isn't working with navigatorKey on MaterialApp (hangs on `ConnectionState.waiting`)

I am using a navigatorKey inside my MaterialApp constructor on my main.dart page. Every time I load the app I see the userSnapshot is passed to the AuthWidget with the ConnectionState.waiting, however, when I debug the StreamBuilder inside AuthWidgetBuilder I am seeing the snapshot sent with the correct user, then somehow the navigatorKey

Here is my code in the main.dart file:

        child: MultiProvider(
          providers: [
            Provider<FirebaseAuthService>(
              create: config.authServiceBuilder,
            ),
            Provider.value(value: locator<NavigationService>()),
          ],
          child: AuthWidgetBuilder(
            databaseBuilder: config.databaseBuilder,
            builder: (BuildContext context, AsyncSnapshot<User> userSnapshot) {
              return MaterialApp(
                navigatorKey:
                    Provider.of<NavigationService>(context).navigationKey,
                home: AuthWidget(userSnapshot: userSnapshot),

I've also tried to inject the service with get-it. Any help would be very much appreciated.

ProxyProvider

Hi Looking at the widget model.
Is it not possible to merge the multi providers by utilizing the proxyprovider method?

Like:

      return MultiProvider(
      providers: [
        Provider<MultiProvider>(
          create: authServiceBuilder,
        ),
       ProxyProvider<authServiceBuilder, FirestoreDatabase> (
          create: (context) {
             final user = Provider.of<FirebaseUser>(context);
             return restoreDatabase(user); 
         }),
      ],

Or does this allow for more flexability later on in dev?
image

Thanks,
L

Flutter Web; Riverpod Firebase Auth; Hot Restart/Reload

Tried, original project as is and several package down grades. Can not get flutter web to hot restart or reload with Riverpod and Firebase Auth. The user session seems to be lost. Works fine on mobile. Any guidance would be appreciated. Thank You.

Pass additonalUserInfo object to User model from FirebaseAuthService class

Hello @bizz84,

I was developing my application with your starter architecture as the base and I'm really thankful to you for this thorough explanation of all the concepts used. Although, there is a requirement that I need to use a different on-boarding flow when the User signs up for the first time apart from the usual flow.

So, after digging around a bit, I found that Firebase provides a bool variable isNewUser in the additionalUserInfo object of the AuthResult class. So, naturally my first thought was to pass this bool into the User model so that I can then verify whether the user has signed up for the first time and pass the corresponding route in the AuthWidget class like this.

class AuthWidget extends StatelessWidget {
  const AuthWidget({Key key, @required this.userSnapshot}) : super(key: key);
  final AsyncSnapshot<User> userSnapshot;

  @override
  Widget build(BuildContext context) {
    if (userSnapshot.connectionState == ConnectionState.active) {
      if (userSnapshot.hasData) {
        return userSnapshot.data.isNew ? OnBoardingPage() : RootWidget();  
      } else {
        return SignInPageBuilder();
      }
    }
    return Scaffold(
        body: Center(
      child: CircularProgressIndicator(),
    ));
  }
}

So while passing the boolean variable into the user model from my FirebaseAuthService class, I ran into some trouble. This is what I thought of doing in the FirebaseAuthService class. I have left comments inside the code for better understanding.

class FirebaseAuthService {
  final FirebaseAuth _firebaseAuth = FirebaseAuth.instance;

  User _userFromFirebase(FirebaseUser user, AdditionalUserInfo additionalUserInfo) {
    if(user == null){
      return null;
    }
    return User(
      uid: user.uid,
      email: user.email,
      photoUrl: user.photoUrl,
      displayName: user.displayName,
      isNew: additionalUserInfo.isNewUser // Passing this new variable from the AdditionalUserInfo var we passed as an argument
    );
  }

  Stream<User> get onAuthStateChanged {
	// This is where the first trouble is. The linter shows me the error : 
	// The argument type 'User Function(FirebaseUser, AdditionalUserInfo)' can't be assigned to the parameter type 'User Function(FirebaseUser)'.
	// So I guess no other arguments can be passed to the _userFromFirebase function
    return _firebaseAuth.onAuthStateChanged.map(_userFromFirebase);
  }

  Future<User> signInUsingGoogle() async {
    final GoogleSignIn googleSignIn = GoogleSignIn();
    final GoogleSignInAccount googleSignInAccount = await googleSignIn.signIn();
    final GoogleSignInAuthentication googleSignInAuthentication = await googleSignInAccount.authentication;
    final AuthCredential credential = GoogleAuthProvider.getCredential(
      idToken: googleSignInAuthentication.idToken, 
      accessToken: googleSignInAuthentication.accessToken
    );
    final AuthResult authResult = await _firebaseAuth.signInWithCredential(credential);
	// passing the additionalUserInfo variable
    return _userFromFirebase(authResult.user, authResult.additionalUserInfo);
  }

  Future<User> signInUsingFacebook() async {
    final FacebookLogin facebookLogin = FacebookLogin();
    final FacebookLoginResult facebookLoginResult = await facebookLogin.logIn(['email']);
    switch(facebookLoginResult.status) {
      case FacebookLoginStatus.cancelledByUser:
        print("Cancelled by user");
        break;
      case FacebookLoginStatus.error:
        print("error sigining using facebook");
        break;
      case FacebookLoginStatus.loggedIn:
        print("Logged In with facebook");
        break;
    }
    final accessToken = facebookLoginResult.accessToken.token;
    if(facebookLoginResult.status == FacebookLoginStatus.loggedIn) {
      final facebookAuthcred = FacebookAuthProvider.getCredential(accessToken: accessToken);
      final AuthResult authResult = await _firebaseAuth.signInWithCredential(facebookAuthcred);
	  // Same as Google login flow
      return _userFromFirebase(authResult.user, authResult.additionalUserInfo);
    }
    return null;
  }

  Future<User> currentUser() async {
    final FirebaseUser user = await _firebaseAuth.currentUser();
	// This is the second confusion.
	// Since we don't have an AuthResult object, how do I pass that variable.
	// I could set the default value for the variable to null/false but I don't think that will be a scalable solution
    return _userFromFirebase(user);
  }

  Future<void> signOut() async {
    return _firebaseAuth.signOut();
  }

}

Please do tell me if you have a better solution for this problem in mind, I'll be more than happy to discuss it with you. Also, do comment if you need anything else from me. Thanks!

Not compiling for Web or Android due to Localization problem with flutter_svg

I've just forked the repo but when trying to build for either Web or Android running in the below errors:

Building without sound null safety
For more information see https://dart.dev/null-safety/unsound-null-safety

Target dart2js failed: Exception: ../../../snap/flutter/common/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_svg-0.19.2+1/lib/src/picture_provider.dart:57:59:
Error: No named parameter with the name 'nullOk'.
        context != null ? Localizations.localeOf(context, nullOk: true) : null,
                                                          ^^^^^^
../../../snap/flutter/common/flutter/packages/flutter/lib/src/widgets/localizations.dart:413:17:
Info: Found this candidate, but the arguments don't match.
  static Locale localeOf(BuildContext context) {
                ^^^^^^^^
Error: Compilation failed.

Compiling lib/main.dart for the Web... 13.4s
Exception: Failed to compile application for the Web.

Web build broken due to Firebase initilization in main.dart

Followed the steps on the README to get started with Firebase in a web app. Works fine from source. No issues.

Cut a build: flutter build web and host the webapp anywhere (doesn't seem to matter nginx, apache, nodejs):
Uncaught FirebaseError: Firebase: No Firebase App '[DEFAULT]' has been created - call Firebase App.initializeApp() (app/no-app).

I've verified my firebase-config.js is being read correctly, the firebaseConfig import has the appropriate values.

Any ideas?

Question -- Best way to add various Firebase sign-in methods

Great work on all these repos. I am new to Flutter and was wondering if you had some pointers on the best way to add various Firebase sign-in methods to this repo. I want to use riverpod instead of provider from your example here.

Any code snippets or pointers would go a long way.

Much appreicated!

Delete an item causes an exeption

Try to delete an item
โ•โ•โ•โ•โ•โ•โ•โ• Exception caught by widgets library โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
A dismissed Dismissible widget is still part of the tree.
The relevant error-causing widget was
Dismissible-[<'entry-2021-01-02T09:38:23.156220'>]
lib/โ€ฆ/job_entries/entry_list_item.dart:95
โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•

Navigator 2.0

Could you update the example to use Navigator 2.0 and Flutter Web?

Maybe this is related to #55

Parent Reload on Navigate

How is that possible when I open the other pages. the parent always reloads including streams

Confused! Should only child widgets update?

StreamBuilder stuck on ConnectionState.waiting

Hey Andrea,

I have a StreamBuilder with the stream below that queries documents isGreaterThanOrEqualTo DateTime.now()

If the query returns 1 or more results, everything works well. If, however, the results are empty (no documents exist with liveDate >= now), the stream hangs on ConnectionState.waiting and I get a perpetual CircularProgressIndicator. Any ideas?

Stream<List<Object>> objectStreamAfterDate({@required DateTime afterDate}) => _service.collectionStream(
        path: FirestorePath.objects(),
        queryBuilder: (query) => query.where('isLive', isEqualTo: true)
          .where('isDeleted', isEqualTo: false)
          .where('liveDate', isGreaterThanOrEqualTo: DateTime.now()),
        builder: (data, documentId) => Object.fromMap(data, documentId),
        sort: (lhs, rhs) => rhs.createdDate.compareTo(lhs.createdDate),
      );

Hot reload does not work

After changing a file and saving it, the app will reload but it gets stuck on the loading (spinner) page until I refresh the page using Cmd+R. Any idea why this could be happening? the hot reload work in a flutter vanilla app.

Use of latest auto_route (0.4.3) instead of 0.2.2

Hi, I'm trying to upgrade this code to use the latest version of auto_route instead of the old one supplied. Auto_route has replaced the native navigator with ExtendedNavigator which you supply through MaterialApp's builder. I've tried a couple of different approaches and I can't see why when the user snaphot gets passed to AuthWidget, the firebase auth now gets stuck on connectionState=waiting and doesn't resolve.

I've tried this:

child: AuthWidgetBuilder(
databaseBuilder: databaseBuilder,
builder: (BuildContext context, AsyncSnapshot userSnapshot) {
return MaterialApp(
theme: ThemeData(primarySwatch: Colors.indigo),
builder: ExtendedNavigator(
router: Router(),
initialRoute: Routes.authWidget,
initialRouteArgs: AuthWidgetArguments(userSnapshot: userSnapshot)),
);

..and also:

child: AuthWidgetBuilder(
databaseBuilder: databaseBuilder,
builder: (BuildContext context, AsyncSnapshot userSnapshot) {
return MaterialApp(
builder: (BuildContext context, nativeNavigator) {
return Theme(
data: ThemeData(primarySwatch: Colors.indigo),
child: ExtendedNavigator(
router: Router(),
initialRoute: Routes.authWidget,
initialRouteArgs: AuthWidgetArguments(userSnapshot: userSnapshot),
),
);
}
);
Neither work. Any suggestions. As far I as can tell it should work.
Many thanks,

connectionState always 'waiting'

First off, thanks for making this great architecture!

I'm seeing a constant loader on reload. I'm sure some of the problems I'm having have to do with hot reload / hot restart, but I'm still a little nervous of having the app depend on a onAuthChanged listener. Would it make sense to do something like this on the auth_widget:

    bool _isWaiting = true;
    Future timeOutLoop() async {
      Future.delayed(Duration(seconds: 30));
      _isWaiting = false;
    }
    timeOutLoop();
    return Scaffold(
      body: !_isWaiting
          ? SignInPageBuilder()
          : Loader(

File google-services.json is missing

Build failed with an exception despite putting in the google-services.json file in the app folder.

What went wrong:
Execution failed for task ':app:processDebugGoogleServices'.
File google-services.json is missing. The Google Services Plugin cannot function without it.

The project doesn't build on iOS with the last Flutter's version

This my Flutter version:

Flutter (Channel stable, v1.12.13+hotfix.8, on Mac OS X 10.15.3 19D76, locale en-DE)

This is the console output:

flutter run

Launching lib/main.dart on iPhone de Eduardo in debug mode...

Automatically signing iOS for device deployment using specified development team in Xcode project: 9QYVXCXWY8

Running pod install... 9.9s
Running Xcode build...

Xcode build done. 15.4s
Failed to build iOS app
Error output from Xcode build:
โ†ณ
2020-02-18 23:25:42.746 xcodebuild[65756:818184] DTDeviceKit: Failed to mount DDI from
'<DVTFilePath:0x7ffb2bc10dc0:'/Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/DeviceSupport/6.1/Devel
operDiskImage.dmg'>', error=-402653158: Error Domain=com.apple.dtdevicekit Code=-402653158 "The device is passcode
protected." UserInfo={NSLocalizedFailureReason=Please unlock your device and reattach. (0xE800001A).,
com.apple.dtdevicekit.stacktrace=(
0 DTDeviceKitBase 0x0000000110a0a6e7 DTDKCreateNSError + 109
1 DTDeviceKitBase 0x0000000110a0ade9 DTDK_AMDErrorToNSError + 792
2 DTDeviceKitBase 0x0000000110a48780 -[DTDKMobileDeviceToken _mountDeveloperDiskImage:withError:] +
844
3 DTDeviceKitBase 0x0000000110a4929d __58-[DTDKMobileDeviceToken
mountDeveloperDiskImageWithError:]_block_invoke + 699
4 libdispatch.dylib 0x00007fff6c15c50e _dispatch_client_callout + 8
5 libdispatch.dylib 0x00007fff6c168567 _dispatch_lane_barrier_sync_invoke_and_complete + 60
6 DTDeviceKitBase 0x0000000110a48f80 -[DTDKMobileDeviceToken mountDeveloperDiskImageWithError:] +
199
7 IDEiOSSupportCore 0x000000011062e107 __28-[DVTiOSDevice attachToken:]_block_invoke_4 + 254
8 DVTFoundation 0x00000001013e9e7a DVT_CALLING_CLIENT_BLOCK + 7
9 DVTFoundation 0x00000001013eb552 __DVTDispatchAsync_block_invoke + 809
10 libdispatch.dylib 0x00007fff6c15b583 _dispatch_call_block_and_release + 12
11 libdispatch.dylib 0x00007fff6c15c50e _dispatch_client_callout + 8
12 libdispatch.dylib 0x00007fff6c15e6c0 _dispatch_continuation_pop + 414
13 libdispatch.dylib 0x00007fff6c15ddbe _dispatch_async_redirect_invoke + 703
14 libdispatch.dylib 0x00007fff6c16a7e2 _dispatch_root_queue_drain + 326
15 libdispatch.dylib 0x00007fff6c16af22 _dispatch_worker_thread2 + 92
16 libsystem_pthread.dylib 0x00007fff6c3b66b6 _pthread_wqthread + 220
17 libsystem_pthread.dylib 0x00007fff6c3b5827 start_wqthread + 15
), DVTRadarComponentKey=487927, NSLocalizedDescription=The device is passcode protected.}
2020-02-18 23:25:42.747 xcodebuild[65756:818184] iPhoneSupport: ๐Ÿ“ฑ<DVTiOSDevice (0x7ffb2b1dbd80), iPhone de Eduardo,
iPhone, 13.3.1 (17D50), 9df66569dff84bc18b6fafb3710fae8698b14a30> unable to mount DeveloperDiskImage (Error
Domain=com.apple.dtdevicekit Code=-402653158 "The device is passcode protected." UserInfo={NSLocalizedFailureReason=Please
unlock your device and reattach. (0xE800001A)., com.apple.dtdevicekit.stacktrace=(
0 DTDeviceKitBase 0x0000000110a0a6e7 DTDKCreateNSError + 109
1 DTDeviceKitBase 0x0000000110a0ade9 DTDK_AMDErrorToNSError + 792
2 DTDeviceKitBase 0x0000000110a48780 -[DTDKMobileDeviceToken _mountDeveloperDiskImage:withError:] +
844
3 DTDeviceKitBase 0x0000000110a4929d __58-[DTDKMobileDeviceToken
mountDeveloperDiskImageWithError:]_block_invoke + 699
4 libdispatch.dylib 0x00007fff6c15c50e _dispatch_client_callout + 8
5 libdispatch.dylib 0x00007fff6c168567 _dispatch_lane_barrier_sync_invoke_and_complete + 60
6 DTDeviceKitBase 0x0000000110a48f80 -[DTDKMobileDeviceToken mountDeveloperDiskImageWithError:] +
199
7 IDEiOSSupportCore 0x000000011062e107 __28-[DVTiOSDevice attachToken:]_block_invoke_4 + 254
8 DVTFoundation 0x00000001013e9e7a DVT_CALLING_CLIENT_BLOCK + 7
9 DVTFoundation 0x00000001013eb552 __DVTDispatchAsync_block_invoke + 809
10 libdispatch.dylib 0x00007fff6c15b583 _dispatch_call_block_and_release + 12
11 libdispatch.dylib 0x00007fff6c15c50e _dispatch_client_callout + 8
12 libdispatch.dylib 0x00007fff6c15e6c0 _dispatch_continuation_pop + 414
13 libdispatch.dylib 0x00007fff6c15ddbe _dispatch_async_redirect_invoke + 703
14 libdispatch.dylib 0x00007fff6c16a7e2 _dispatch_root_queue_drain + 326
15 libdispatch.dylib 0x00007fff6c16af22 _dispatch_worker_thread2 + 92
16 libsystem_pthread.dylib 0x00007fff6c3b66b6 _pthread_wqthread + 220
17 libsystem_pthread.dylib 0x00007fff6c3b5827 start_wqthread + 15
), DVTRadarComponentKey=487927, NSLocalizedDescription=The device is passcode protected.})
** BUILD FAILED **

Xcode's output:
โ†ณ
/Users/dudu/Documents/flutter-projects/starter_architecture_flutter_firebase/ios/Pods/FirebaseAuth/Firebase/Auth/Source/Aut
h/FIRAuth.m:32:9: fatal error: 'GoogleUtilities/GULSceneDelegateSwizzler.h' file not found
#import <GoogleUtilities/GULSceneDelegateSwizzler.h>
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/dudu/Documents/flutter-projects/starter_architecture_flutter_firebase/ios/Pods/FirebaseAuth/Firebase/Auth/Source/Aut
h/FIRAuth.m:32:9: note: did not find header 'GULSceneDelegateSwizzler.h' in framework 'GoogleUtilities' (loaded from
'/Users/dudu/Documents/flutter-projects/starter_architecture_flutter_firebase/build/ios/Debug-iphoneos/GoogleUtilities')
1 error generated.
note: Using new build system
note: Planning build
note: Constructing build description

Could not build the precompiled application for the device.

StreamBuilders called too many times when switching between tabs

The StreamBuilders inside the JobsPage and EntriesPage are triggered twice every time the user switches tabs in the bottom navigation bar.

This was confirmed by adding print statements and switching tabs:

I/flutter (27319): Jobs stream rebuild
I/flutter (27319): Entries stream rebuild
I/flutter (27319): Jobs stream rebuild
I/flutter (27319): Entries stream rebuild

This is not good for performance and causes unnecessary reads from Firestore.

Possible duplicate: #25.

Question: Mobx/Slidy-Modular and Firebase RTDB

Hi Andrea,
I watched your youtube video about architecture and i liked very much, mainly the service structure. But im using mobx/slidy-modular and firebase real time data base. Do you have any implementation of architecture with these frameworks, or at least the services files implementation using firebase real time data base?

pub get fails

Background

This is a great project that will help me structure my new app. I really appreciate the code and write up/video. However, I am having some trouble setting the project up locally.

Issue

When I run pub get, the following error is thrown:

Running "flutter pub get" in starter_architecture_flutter_firebase-master...     

Git error. Command: `git rev-list --max-count=1 HEAD`
stdout: 
stderr: usage: git rev-list [OPTION] <commit-id>... [ -- paths... ]
  limiting output:
    --max-count=<n>
    --max-age=<epoch>
    --min-age=<epoch>
    --sparse
    --no-merges
    --min-parents=<n>
    --no-min-parents
    --max-parents=<n>
    --no-max-parents
    --remove-empty
    --all
    --branches
    --tags
    --remotes
    --stdin
    --quiet
  ordering output:
    --topo-order
    --date-order
    --reverse
  formatting output:
    --parents
    --children
    --objects | --objects-edge
    --unpacked
    --header | --pretty
    --[no-]object-names
    --abbrev=<n> | --no-abbrev
    --abbrev-commit
    --left-right
    --count
  special purpose:
    --bisect
    --bisect-vars
    --bisect-all
exit code: 129

I have pinned the issue down to the four dependencies from git (alert_dialogs, custom_buttons, email_password_sign_in_ui, and firestore_service). When I removed those dependencies, pub get ran ok but obviously didn't get all the neccecary dependencies.

Flutter version

Flutter 2.0.3 โ€ข channel stable โ€ข https://github.com/flutter/flutter.git
Framework โ€ข revision 4d7946a68d (6 days ago) โ€ข 2021-03-18 17:24:33 -0700
Engine โ€ข revision 3459eb2436
Tools โ€ข Dart 2.12.2

Expected behavior

I would expect for pub get to work as expected, or to go thru some additional setup process.
Any idea as to what might be going on?

SignIn Auth Flow

Hi Andrea,

I was looking at the following lines of code that deal with the sign in flow towards the root of the project:

return MultiProvider(
providers: [
Provider<User>.value(value: user),
Provider<FirestoreDatabase>(
create: (context) => databaseBuilder(context, user.uid),
),
// NOTE: Any other user-bound providers here can be added here
],
child: builder(context, snapshot),
);
}
return builder(context, snapshot);
.

I see that you're immediately assigning the snapshot data to a User variable, and then supplying the user (if found) as a provider to the rest of the app. In the event that the user is not available in the stream at that time, you return the MaterialApp (builder) without the providers. MaterialApp's child is AuthWidget, which you use to check the connection state, and determine if you should return the HomePage or the SignInPage.

My question is what if there is data in the snapshot now? This means the HomePage is returned, and you now do not have a provider for User or your Database above the MaterialApp in the widget tree. The only way you would have those providers is if you didn't have user data the first time, which would return the SignInPage. Signing in would eventually trigger the streamBuilder listening to onAuthStateChanged, and then you'd have a user hopefully at that point. Unless this is exactly the point, and you wouldn't have the user the first time around, so you'd always hit the SignInPage.

I may be incorrect in my observation, and if so I'd love to know where I'm going wrong.

Configure offline persistence

Hello,

i have tried to use the app without internet and it crashed while by using cloud firestore the app should run without any problem link it is connected?

Context in TabItem

How to access context in TabItem class. How to apply loacalization for bottomnavigationbar?

Firestore Exception Handling

Kindly, Make an App in which you handle Network Exception / Timeout Exception / Connection lose at a sudden point. I really need this. Do it with Best practices

Using advanced Firestore features (e.g. transactions, batched writes, etc.)

TL;DR

what about Firestore transactions, batched writes, field value operations (e.g. FieldValue.arrayUnion)?

Long version

First off, thank for this repo! I have been developing apps in Flutter and it is refreshing to see a different take on app architecture. I have learnt a lot from your work.

I am considering the abstraction you use for working with Firestore db. The approach of viewing it as a CRUD db makes testing easier and also probably migrating to a different db possible.

This abstraction, however, comes at the cost of not having access to the Firestore's advanced features such as transactions, batched writes, field operations such as FieldValue.arrayUnion(), FieldValue.increment(), etc.

I'm interested to know how would you approach exposing these features while still aiming for testability and portability.

Create directories that match diagram flow to better organize project

You've done an incredible job by creating this architecture @bizz84.

For improved readability, I am simply making a suggestion to create directories that match the information flow in your diagram. Personally (and I'm sure for other developers who are also looking at building projects with solid architecture), this could help make the project structure more understandable and readable. Below is my suggestion:

  • /services
  • /routing
  • /common_widgets
  • /models
  • /viewmodels
  • /views

I look forward to hearing your comments.

Add widget tests for MyApp

With the introduction of the onboarding screen (#41), the top-level widget switching logic would benefit from some tests.

This is to check that SignInPage, OnboardingPage or HomePage is returned depending on the application state.

Improve instructions for web support via video and/or "for dummies' approach

Flutter for web is the approach that requires no physical device, no emulator, no sha-1 key, no xcode, no android studio, no play store, no apple store, etc, and so is very nice to have down pat and maybe even as the "first test"

for example, explaining about generated did not immediately lead me to be aware that i could select a "config" option from project settings under firebase web snippet, and it wasn't under the part where you say add web app at all.

Flutter paginated listview

Flutter firebase pagination listview? is possible implement?

i can't implement it on this project help
THX!

Firestore Pagination

Hi @bizz84
Thank you for your work, i use your project as starter.
As an enhencement, it would be awesome to enable firestore pagination.

I don't know how to do it properly, specially when combining streams..

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.