File tree Expand file tree Collapse file tree 7 files changed +578
-316
lines changed
packages/firebase_snippets_app Expand file tree Collapse file tree 7 files changed +578
-316
lines changed Original file line number Diff line number Diff line change 2929 name : " Install Java"
3030 with :
3131 distribution : ' temurin'
32- java-version : ' 11 '
32+ java-version : ' 17 '
3333
3434 - name : " Install Flutter"
3535 run : |
Original file line number Diff line number Diff line change 11buildscript {
2- ext. kotlin_version = ' 1.6 .10'
2+ ext. kotlin_version = ' 1.7 .10'
33 repositories {
44 google()
55 mavenCentral()
66 }
77
88 dependencies {
9- classpath ' com.android.tools.build:gradle:4.1 .0'
9+ classpath ' com.android.tools.build:gradle:7.2 .0'
1010 classpath " org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version "
1111 classpath ' com.google.gms:google-services:4.3.10'
1212 classpath ' com.google.firebase:firebase-crashlytics-gradle:2.7.1'
@@ -29,6 +29,6 @@ subprojects {
2929 project. evaluationDependsOn(' :app' )
3030}
3131
32- task clean ( type : Delete ) {
32+ tasks . register( " clean " , Delete ) {
3333 delete rootProject. buildDir
3434}
Original file line number Diff line number Diff line change @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
33distributionPath =wrapper/dists
44zipStoreBase =GRADLE_USER_HOME
55zipStorePath =wrapper/dists
6- distributionUrl =https\://services.gradle.org/distributions/gradle-6.7 -all.zip
6+ distributionUrl =https\://services.gradle.org/distributions/gradle-7.5 -all.zip
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ import 'dart:math';
55
66import 'package:crypto/crypto.dart' ;
77import 'package:firebase_auth/firebase_auth.dart' ;
8+ import 'package:firebase_auth_platform_interface/firebase_auth_platform_interface.dart' ;
89import 'package:firebase_snippets_app/snippets/snippet_base.dart' ;
910import 'package:flutter/foundation.dart' ;
1011import 'package:google_sign_in/google_sign_in.dart' ;
@@ -576,6 +577,7 @@ class AuthenticationSnippets implements DocSnippet {
576577 await auth.signInWithPhoneNumber (
577578 '+44 7123 123 456' ,
578579 RecaptchaVerifier (
580+ auth: FirebaseAuthPlatform .instance,
579581 container: 'recaptcha' ,
580582 size: RecaptchaVerifierSize .compact,
581583 theme: RecaptchaVerifierTheme .dark,
@@ -584,6 +586,7 @@ class AuthenticationSnippets implements DocSnippet {
584586
585587 // [START phone_auth_verify_recaptcha]
586588 RecaptchaVerifier (
589+ auth: FirebaseAuthPlatform .instance,
587590 onSuccess: () => print ('reCAPTCHA Completed!' ),
588591 onError: (FirebaseAuthException error) => print (error),
589592 onExpired: () => print ('reCAPTCHA Expired!' ),
Original file line number Diff line number Diff line change @@ -824,8 +824,8 @@ class FirestoreSnippets extends DocSnippet {
824824 void aggregationQuery_count () {
825825 // [START count_aggregate_collection]
826826 // Returns number of documents in users collection
827- db.collection ("users" ).count ().then (
828- (res) => print (res.data (). count),
827+ db.collection ("users" ).count ().get (). then (
828+ (res) => print (res.count),
829829 onError: (e) => print ("Error completing: $e " ),
830830 );
831831 // [END count_aggregate_collection]
@@ -834,8 +834,8 @@ class FirestoreSnippets extends DocSnippet {
834834 void aggregationQuery_count2 () {
835835 // [START count_aggregate_query]
836836 // This also works with collectionGroup queries.
837- db.collection ("users" ).where ("age" , isGreaterThan: 10 ).count ().then (
838- (res) => print (res.data (). count),
837+ db.collection ("users" ).where ("age" , isGreaterThan: 10 ).count ().get (). then (
838+ (res) => print (res.count),
839839 onError: (e) => print ("Error completing: $e " ),
840840 );
841841 // [END count_aggregate_query]
You can’t perform that action at this time.
0 commit comments