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 29
29
name : " Install Java"
30
30
with :
31
31
distribution : ' temurin'
32
- java-version : ' 11 '
32
+ java-version : ' 17 '
33
33
34
34
- name : " Install Flutter"
35
35
run : |
Original file line number Diff line number Diff line change 1
1
buildscript {
2
- ext. kotlin_version = ' 1.6 .10'
2
+ ext. kotlin_version = ' 1.7 .10'
3
3
repositories {
4
4
google()
5
5
mavenCentral()
6
6
}
7
7
8
8
dependencies {
9
- classpath ' com.android.tools.build:gradle:4.1 .0'
9
+ classpath ' com.android.tools.build:gradle:7.2 .0'
10
10
classpath " org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version "
11
11
classpath ' com.google.gms:google-services:4.3.10'
12
12
classpath ' com.google.firebase:firebase-crashlytics-gradle:2.7.1'
@@ -29,6 +29,6 @@ subprojects {
29
29
project. evaluationDependsOn(' :app' )
30
30
}
31
31
32
- task clean ( type : Delete ) {
32
+ tasks . register( " clean " , Delete ) {
33
33
delete rootProject. buildDir
34
34
}
Original file line number Diff line number Diff line change @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
3
3
distributionPath =wrapper/dists
4
4
zipStoreBase =GRADLE_USER_HOME
5
5
zipStorePath =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';
5
5
6
6
import 'package:crypto/crypto.dart' ;
7
7
import 'package:firebase_auth/firebase_auth.dart' ;
8
+ import 'package:firebase_auth_platform_interface/firebase_auth_platform_interface.dart' ;
8
9
import 'package:firebase_snippets_app/snippets/snippet_base.dart' ;
9
10
import 'package:flutter/foundation.dart' ;
10
11
import 'package:google_sign_in/google_sign_in.dart' ;
@@ -576,6 +577,7 @@ class AuthenticationSnippets implements DocSnippet {
576
577
await auth.signInWithPhoneNumber (
577
578
'+44 7123 123 456' ,
578
579
RecaptchaVerifier (
580
+ auth: FirebaseAuthPlatform .instance,
579
581
container: 'recaptcha' ,
580
582
size: RecaptchaVerifierSize .compact,
581
583
theme: RecaptchaVerifierTheme .dark,
@@ -584,6 +586,7 @@ class AuthenticationSnippets implements DocSnippet {
584
586
585
587
// [START phone_auth_verify_recaptcha]
586
588
RecaptchaVerifier (
589
+ auth: FirebaseAuthPlatform .instance,
587
590
onSuccess: () => print ('reCAPTCHA Completed!' ),
588
591
onError: (FirebaseAuthException error) => print (error),
589
592
onExpired: () => print ('reCAPTCHA Expired!' ),
Original file line number Diff line number Diff line change @@ -824,8 +824,8 @@ class FirestoreSnippets extends DocSnippet {
824
824
void aggregationQuery_count () {
825
825
// [START count_aggregate_collection]
826
826
// 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),
829
829
onError: (e) => print ("Error completing: $e " ),
830
830
);
831
831
// [END count_aggregate_collection]
@@ -834,8 +834,8 @@ class FirestoreSnippets extends DocSnippet {
834
834
void aggregationQuery_count2 () {
835
835
// [START count_aggregate_query]
836
836
// 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),
839
839
onError: (e) => print ("Error completing: $e " ),
840
840
);
841
841
// [END count_aggregate_query]
You can’t perform that action at this time.
0 commit comments