From 74bebd13b03acebbffee4ac66fa071eccc34b314 Mon Sep 17 00:00:00 2001 From: Lockie Richter Date: Sat, 2 Mar 2024 14:49:13 +1030 Subject: [PATCH] Change position using drag and drop --- ios/Runner/Info.plist | 3 + .../firebase_authentication_repository.dart | 19 +- lib/src/data/book/book_repository.dart | 2 + .../data/book/firebase_book_repository.dart | 10 + lib/src/providers/authentication.dart | 7 +- lib/src/ui/book/book_item_widget.dart | 1 + lib/src/ui/main/book_state_page.dart | 55 +- ...rebase_authentication_repository_test.dart | 70 +- ..._authentication_repository_test.mocks.dart | 678 +++++++++++------- 9 files changed, 567 insertions(+), 278 deletions(-) diff --git a/ios/Runner/Info.plist b/ios/Runner/Info.plist index 1e4564a..e60e47a 100644 --- a/ios/Runner/Info.plist +++ b/ios/Runner/Info.plist @@ -46,6 +46,9 @@ CADisableMinimumFrameDurationOnPhone + GIDClientID + + 150599422814-eorssa86b5b5l2p2h4ri8bhg82jqsovj.apps.googleusercontent.com CFBundleURLTypes diff --git a/lib/src/data/authentication/firebase_authentication_repository.dart b/lib/src/data/authentication/firebase_authentication_repository.dart index 1104065..6a1510f 100644 --- a/lib/src/data/authentication/firebase_authentication_repository.dart +++ b/lib/src/data/authentication/firebase_authentication_repository.dart @@ -3,11 +3,13 @@ import 'package:dantex/src/data/authentication/authentication_repository.dart'; import 'package:dantex/src/data/authentication/entity/dante_user.dart'; import 'package:firebase_auth/firebase_auth.dart'; import 'package:flutter/foundation.dart' show kIsWeb; +import 'package:google_sign_in/google_sign_in.dart'; class FirebaseAuthenticationRepository implements AuthenticationRepository { final FirebaseAuth _fbAuth; + final GoogleSignIn googleSignIn; - FirebaseAuthenticationRepository(this._fbAuth); + FirebaseAuthenticationRepository(this._fbAuth, this.googleSignIn); @override Stream get authStateChanges => @@ -89,14 +91,23 @@ class FirebaseAuthenticationRepository implements AuthenticationRepository { } @override - Future loginWithGoogle() { + Future loginWithGoogle() async { + final googleSignInAccount = await googleSignIn.signIn(); + final GoogleSignInAuthentication? googleAuth = + await googleSignInAccount?.authentication; + + final credential = GoogleAuthProvider.credential( + accessToken: googleAuth?.accessToken, + idToken: googleAuth?.idToken, + ); + if (kIsWeb) { return _fbAuth.signInWithPopup( GoogleAuthProvider(), ); } else { - return _fbAuth.signInWithProvider( - GoogleAuthProvider(), + return _fbAuth.signInWithCredential( + credential, ); } } diff --git a/lib/src/data/book/book_repository.dart b/lib/src/data/book/book_repository.dart index 638bdae..acd3f0b 100644 --- a/lib/src/data/book/book_repository.dart +++ b/lib/src/data/book/book_repository.dart @@ -47,4 +47,6 @@ abstract class BookRepository { Future deleteNotes(String bookId); Future saveNotes(String bookId, String notes); + + Future updatePositions(List books); } diff --git a/lib/src/data/book/firebase_book_repository.dart b/lib/src/data/book/firebase_book_repository.dart index be308f4..3aec62a 100644 --- a/lib/src/data/book/firebase_book_repository.dart +++ b/lib/src/data/book/firebase_book_repository.dart @@ -238,6 +238,16 @@ class FirebaseBookRepository implements BookRepository { Future saveNotes(String bookId, String notes) { return _booksRef().child(bookId).update({'notes': notes}); } + + @override + Future updatePositions(List books) async { + final Map updateMap = {}; + for (var i = 0; i < books.length; i++) { + final book = books[i]; + updateMap[book.id] = book.copyWith(position: i).toJson(); + } + await _booksRef().update(updateMap); + } } extension DataSnapshotExtension on DataSnapshot { diff --git a/lib/src/providers/authentication.dart b/lib/src/providers/authentication.dart index 5d63fa7..3f9e086 100644 --- a/lib/src/providers/authentication.dart +++ b/lib/src/providers/authentication.dart @@ -33,6 +33,7 @@ AuthenticationRepository authenticationRepository( ) => FirebaseAuthenticationRepository( ref.watch(firebaseAuthProvider), + ref.watch(googleSignInProvider), ); @riverpod @@ -42,13 +43,13 @@ Future user(UserRef ref) { return ref.watch(authenticationRepositoryProvider).getAccount(); } -@riverpod +@Riverpod(keepAlive: true) GoogleSignIn googleSignIn( GoogleSignInRef ref, ) => GoogleSignIn( - clientId: - '150599422814-moto7djse1tf7vtso7slemniki76ohg6.apps.googleusercontent.com', + // clientId: + // '150599422814-moto7djse1tf7vtso7slemniki76ohg6.apps.googleusercontent.com', scopes: [ DriveApi.driveFileScope, ], diff --git a/lib/src/ui/book/book_item_widget.dart b/lib/src/ui/book/book_item_widget.dart index bb2baa3..dcfe8fd 100644 --- a/lib/src/ui/book/book_item_widget.dart +++ b/lib/src/ui/book/book_item_widget.dart @@ -32,6 +32,7 @@ class BookItemWidget extends StatelessWidget { @override Widget build(BuildContext context) { return InkWell( + borderRadius: BorderRadius.circular(12.0), onTap: () { context.go( DanteRoute.bookDetail.navigationUrl.replaceAll(':bookId', _book.id), diff --git a/lib/src/ui/main/book_state_page.dart b/lib/src/ui/main/book_state_page.dart index b20b585..1c2a352 100644 --- a/lib/src/ui/main/book_state_page.dart +++ b/lib/src/ui/main/book_state_page.dart @@ -52,26 +52,59 @@ class _BooksScreen extends ConsumerWidget { _buildLargeLayout(bookRepository, columns: 3), DeviceFormFactor.tablet => _buildLargeLayout(bookRepository, columns: 2), - DeviceFormFactor.phone => _buildPhoneLayout( - bookRepository, - ), + DeviceFormFactor.phone => _buildPhoneLayout(bookRepository), }; }, ); } Widget _buildPhoneLayout(BookRepository bookRepository) { - return ListView.separated( - padding: const EdgeInsets.all(16.0), + return ReorderableListView.builder( + proxyDecorator: (child, index, animation) { + return Material( + color: Colors.transparent, + child: Stack( + children: [ + Positioned( + top: 0, + left: 0, + right: 0, + bottom: 16, + child: Material( + borderRadius: BorderRadius.circular(16), + elevation: 24, + shadowColor: Colors.black.withOpacity(0.6), + ), + ), + child, + ], + ), + ); + }, + padding: const EdgeInsets.symmetric(horizontal: 16.0), physics: const BouncingScrollPhysics(), itemCount: books.length, - itemBuilder: (context, index) => _buildItem( - books[index], - bookRepository, - useMobileLayout: true, + itemBuilder: (context, index) => Column( + key: ValueKey(books[index].id), + children: [ + _buildItem( + books[index], + bookRepository, + useMobileLayout: true, + ), + const SizedBox( + height: 16, + ), + ], ), - separatorBuilder: (BuildContext context, int index) => - const SizedBox(height: 16), + onReorder: (oldIndex, newIndex) async { + if (oldIndex < newIndex) { + newIndex -= 1; + } + final Book book = books.removeAt(oldIndex); + books.insert(newIndex, book); + await bookRepository.updatePositions(books); + }, ); } diff --git a/test/data/authentication/firebase_authentication_repository_test.dart b/test/data/authentication/firebase_authentication_repository_test.dart index fa0b04d..8fd83e5 100644 --- a/test/data/authentication/firebase_authentication_repository_test.dart +++ b/test/data/authentication/firebase_authentication_repository_test.dart @@ -4,12 +4,16 @@ import 'package:dantex/src/data/authentication/entity/dante_user.dart'; import 'package:dantex/src/data/authentication/firebase_authentication_repository.dart'; import 'package:firebase_auth/firebase_auth.dart'; import 'package:flutter_test/flutter_test.dart'; +import 'package:google_sign_in/google_sign_in.dart'; import 'package:mockito/annotations.dart'; import 'package:mockito/mockito.dart'; import 'firebase_authentication_repository_test.mocks.dart'; @GenerateMocks([ + GoogleSignIn, + GoogleSignInAccount, + GoogleSignInAuthentication, FirebaseAuth, UserCredential, User, @@ -21,7 +25,8 @@ void main() { test('Get account returns DanteUser', () async { final fbAuth = MockFirebaseAuth(); - final fbAuthRepo = FirebaseAuthenticationRepository(fbAuth); + final googleSignIn = MockGoogleSignIn(); + final fbAuthRepo = FirebaseAuthenticationRepository(fbAuth, googleSignIn); final User user = MockUser(); final UserInfo userInfo = MockUserInfo(); final DanteUser danteUser = DanteUser( @@ -56,18 +61,29 @@ void main() { group('Login', () { test('Login with Google returns user credential on success', () async { final fbAuth = MockFirebaseAuth(); - final firebaseAuthRepo = FirebaseAuthenticationRepository(fbAuth); + final googleSignIn = MockGoogleSignIn(); + final firebaseAuthRepo = + FirebaseAuthenticationRepository(fbAuth, googleSignIn); final userCred = MockUserCredential(); + final googleSignInAccount = MockGoogleSignInAccount(); + final googleAuth = MockGoogleSignInAuthentication(); - when(fbAuth.signInWithProvider(any)).thenAnswer((_) async => userCred); + when(googleSignIn.signIn()).thenAnswer((_) async => googleSignInAccount); + when(googleSignInAccount.authentication) + .thenAnswer((_) async => googleAuth); + when(googleAuth.idToken).thenReturn('idToken'); + when(googleAuth.accessToken).thenReturn('accessToken'); + when(fbAuth.signInWithCredential(any)).thenAnswer((_) async => userCred); expect(await firebaseAuthRepo.loginWithGoogle(), userCred); - verify(fbAuth.signInWithProvider(any)).called(1); + verify(fbAuth.signInWithCredential(any)).called(1); }); test('Login anonymously returns User Credential on success', () async { final fbAuth = MockFirebaseAuth(); - final firebaseAuthRepo = FirebaseAuthenticationRepository(fbAuth); + final googleSignIn = MockGoogleSignIn(); + final firebaseAuthRepo = + FirebaseAuthenticationRepository(fbAuth, googleSignIn); final userCred = MockUserCredential(); when(fbAuth.signInAnonymously()).thenAnswer((_) async => userCred); @@ -78,7 +94,9 @@ void main() { test('Login with email returns User Credential on success', () async { final fbAuth = MockFirebaseAuth(); - final firebaseAuthRepo = FirebaseAuthenticationRepository(fbAuth); + final googleSignIn = MockGoogleSignIn(); + final firebaseAuthRepo = + FirebaseAuthenticationRepository(fbAuth, googleSignIn); final userCred = MockUserCredential(); when( @@ -106,7 +124,9 @@ void main() { test('logout returns void on success', () async { final fbAuth = MockFirebaseAuth(); - final firebaseAuthRepo = FirebaseAuthenticationRepository(fbAuth); + final googleSignIn = MockGoogleSignIn(); + final firebaseAuthRepo = + FirebaseAuthenticationRepository(fbAuth, googleSignIn); when(fbAuth.signOut()).thenAnswer((_) async => Future); @@ -118,7 +138,9 @@ void main() { 'fetchSignInMethodsForEmail maps sign in methods to AuthenticationSource', () async { final fbAuth = MockFirebaseAuth(); - final firebaseAuthRepo = FirebaseAuthenticationRepository(fbAuth); + final googleSignIn = MockGoogleSignIn(); + final firebaseAuthRepo = + FirebaseAuthenticationRepository(fbAuth, googleSignIn); when(fbAuth.fetchSignInMethodsForEmail(testEmail)) .thenAnswer((_) async => ['google.com', 'password', 'apple.com']); @@ -137,7 +159,9 @@ void main() { test('Create mail account returns User Credential on success', () async { final fbAuth = MockFirebaseAuth(); - final firebaseAuthRepo = FirebaseAuthenticationRepository(fbAuth); + final googleSignIn = MockGoogleSignIn(); + final firebaseAuthRepo = + FirebaseAuthenticationRepository(fbAuth, googleSignIn); final userCred = MockUserCredential(); when( @@ -165,7 +189,9 @@ void main() { test('Upgrade anonymous account returns User Credential on success', () async { final fbAuth = MockFirebaseAuth(); - final firebaseAuthRepo = FirebaseAuthenticationRepository(fbAuth); + final googleSignIn = MockGoogleSignIn(); + final firebaseAuthRepo = + FirebaseAuthenticationRepository(fbAuth, googleSignIn); final user = MockUser(); final userCred = MockUserCredential(); @@ -190,7 +216,9 @@ void main() { 'Upgrade anonymous account throws FirebaseAuthException error when user not found', () async { final fbAuth = MockFirebaseAuth(); - final firebaseAuthRepo = FirebaseAuthenticationRepository(fbAuth); + final googleSignIn = MockGoogleSignIn(); + final firebaseAuthRepo = + FirebaseAuthenticationRepository(fbAuth, googleSignIn); when( fbAuth.currentUser, @@ -207,7 +235,9 @@ void main() { test('Update user password returns void on success', () { final fbAuth = MockFirebaseAuth(); - final firebaseAuthRepo = FirebaseAuthenticationRepository(fbAuth); + final googleSignIn = MockGoogleSignIn(); + final firebaseAuthRepo = + FirebaseAuthenticationRepository(fbAuth, googleSignIn); final user = MockUser(); when(fbAuth.currentUser).thenReturn(user); @@ -223,7 +253,9 @@ void main() { 'Upgrade password throws FirebaseAuthException error when user not found', () async { final fbAuth = MockFirebaseAuth(); - final firebaseAuthRepo = FirebaseAuthenticationRepository(fbAuth); + final googleSignIn = MockGoogleSignIn(); + final firebaseAuthRepo = + FirebaseAuthenticationRepository(fbAuth, googleSignIn); when( fbAuth.currentUser, @@ -239,7 +271,9 @@ void main() { test('Send password reset request returns void on success', () { final fbAuth = MockFirebaseAuth(); - final firebaseAuthRepo = FirebaseAuthenticationRepository(fbAuth); + final googleSignIn = MockGoogleSignIn(); + final firebaseAuthRepo = + FirebaseAuthenticationRepository(fbAuth, googleSignIn); when(fbAuth.sendPasswordResetEmail(email: testEmail)) .thenAnswer((_) async => Future); @@ -250,7 +284,9 @@ void main() { test('Delete user returns void on success', () async { final fbAuth = MockFirebaseAuth(); - final firebaseAuthRepo = FirebaseAuthenticationRepository(fbAuth); + final googleSignIn = MockGoogleSignIn(); + final firebaseAuthRepo = + FirebaseAuthenticationRepository(fbAuth, googleSignIn); final User user = MockUser(); when(fbAuth.currentUser).thenReturn(user); @@ -263,7 +299,9 @@ void main() { test('Auth state changes returns DanteUser', () { final fbAuth = MockFirebaseAuth(); - final firebaseAuthRepo = FirebaseAuthenticationRepository(fbAuth); + final googleSignIn = MockGoogleSignIn(); + final firebaseAuthRepo = + FirebaseAuthenticationRepository(fbAuth, googleSignIn); final User user = MockUser(); final UserInfo userInfo = MockUserInfo(); final DanteUser danteUser = DanteUser( diff --git a/test/data/authentication/firebase_authentication_repository_test.mocks.dart b/test/data/authentication/firebase_authentication_repository_test.mocks.dart index 5fa1a5d..4ebacc2 100644 --- a/test/data/authentication/firebase_authentication_repository_test.mocks.dart +++ b/test/data/authentication/firebase_authentication_repository_test.mocks.dart @@ -3,14 +3,17 @@ // Do not manually edit this file. // ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:async' as _i5; +import 'dart:async' as _i7; -import 'package:firebase_auth/firebase_auth.dart' as _i4; +import 'package:firebase_auth/firebase_auth.dart' as _i5; import 'package:firebase_auth_platform_interface/firebase_auth_platform_interface.dart' - as _i3; -import 'package:firebase_core/firebase_core.dart' as _i2; + as _i4; +import 'package:firebase_core/firebase_core.dart' as _i3; +import 'package:google_sign_in/google_sign_in.dart' as _i2; +import 'package:google_sign_in_platform_interface/google_sign_in_platform_interface.dart' + as _i6; import 'package:mockito/mockito.dart' as _i1; -import 'package:mockito/src/dummies.dart' as _i6; +import 'package:mockito/src/dummies.dart' as _i8; // ignore_for_file: type=lint // ignore_for_file: avoid_redundant_argument_values @@ -25,8 +28,9 @@ import 'package:mockito/src/dummies.dart' as _i6; // ignore_for_file: camel_case_types // ignore_for_file: subtype_of_sealed_class -class _FakeFirebaseApp_0 extends _i1.SmartFake implements _i2.FirebaseApp { - _FakeFirebaseApp_0( +class _FakeGoogleSignInAuthentication_0 extends _i1.SmartFake + implements _i2.GoogleSignInAuthentication { + _FakeGoogleSignInAuthentication_0( Object parent, Invocation parentInvocation, ) : super( @@ -35,9 +39,8 @@ class _FakeFirebaseApp_0 extends _i1.SmartFake implements _i2.FirebaseApp { ); } -class _FakeActionCodeInfo_1 extends _i1.SmartFake - implements _i3.ActionCodeInfo { - _FakeActionCodeInfo_1( +class _FakeFirebaseApp_1 extends _i1.SmartFake implements _i3.FirebaseApp { + _FakeFirebaseApp_1( Object parent, Invocation parentInvocation, ) : super( @@ -46,9 +49,9 @@ class _FakeActionCodeInfo_1 extends _i1.SmartFake ); } -class _FakeUserCredential_2 extends _i1.SmartFake - implements _i4.UserCredential { - _FakeUserCredential_2( +class _FakeActionCodeInfo_2 extends _i1.SmartFake + implements _i4.ActionCodeInfo { + _FakeActionCodeInfo_2( Object parent, Invocation parentInvocation, ) : super( @@ -57,9 +60,9 @@ class _FakeUserCredential_2 extends _i1.SmartFake ); } -class _FakeConfirmationResult_3 extends _i1.SmartFake - implements _i4.ConfirmationResult { - _FakeConfirmationResult_3( +class _FakeUserCredential_3 extends _i1.SmartFake + implements _i5.UserCredential { + _FakeUserCredential_3( Object parent, Invocation parentInvocation, ) : super( @@ -68,8 +71,9 @@ class _FakeConfirmationResult_3 extends _i1.SmartFake ); } -class _FakeUserMetadata_4 extends _i1.SmartFake implements _i3.UserMetadata { - _FakeUserMetadata_4( +class _FakeConfirmationResult_4 extends _i1.SmartFake + implements _i5.ConfirmationResult { + _FakeConfirmationResult_4( Object parent, Invocation parentInvocation, ) : super( @@ -78,8 +82,8 @@ class _FakeUserMetadata_4 extends _i1.SmartFake implements _i3.UserMetadata { ); } -class _FakeMultiFactor_5 extends _i1.SmartFake implements _i4.MultiFactor { - _FakeMultiFactor_5( +class _FakeUserMetadata_5 extends _i1.SmartFake implements _i4.UserMetadata { + _FakeUserMetadata_5( Object parent, Invocation parentInvocation, ) : super( @@ -88,8 +92,8 @@ class _FakeMultiFactor_5 extends _i1.SmartFake implements _i4.MultiFactor { ); } -class _FakeIdTokenResult_6 extends _i1.SmartFake implements _i3.IdTokenResult { - _FakeIdTokenResult_6( +class _FakeMultiFactor_6 extends _i1.SmartFake implements _i5.MultiFactor { + _FakeMultiFactor_6( Object parent, Invocation parentInvocation, ) : super( @@ -98,8 +102,8 @@ class _FakeIdTokenResult_6 extends _i1.SmartFake implements _i3.IdTokenResult { ); } -class _FakeUser_7 extends _i1.SmartFake implements _i4.User { - _FakeUser_7( +class _FakeIdTokenResult_7 extends _i1.SmartFake implements _i4.IdTokenResult { + _FakeIdTokenResult_7( Object parent, Invocation parentInvocation, ) : super( @@ -108,25 +112,211 @@ class _FakeUser_7 extends _i1.SmartFake implements _i4.User { ); } +class _FakeUser_8 extends _i1.SmartFake implements _i5.User { + _FakeUser_8( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +/// A class which mocks [GoogleSignIn]. +/// +/// See the documentation for Mockito's code generation for more information. +class MockGoogleSignIn extends _i1.Mock implements _i2.GoogleSignIn { + MockGoogleSignIn() { + _i1.throwOnMissingStub(this); + } + + @override + _i6.SignInOption get signInOption => (super.noSuchMethod( + Invocation.getter(#signInOption), + returnValue: _i6.SignInOption.standard, + ) as _i6.SignInOption); + + @override + List get scopes => (super.noSuchMethod( + Invocation.getter(#scopes), + returnValue: [], + ) as List); + + @override + bool get forceCodeForRefreshToken => (super.noSuchMethod( + Invocation.getter(#forceCodeForRefreshToken), + returnValue: false, + ) as bool); + + @override + _i7.Stream<_i2.GoogleSignInAccount?> get onCurrentUserChanged => + (super.noSuchMethod( + Invocation.getter(#onCurrentUserChanged), + returnValue: _i7.Stream<_i2.GoogleSignInAccount?>.empty(), + ) as _i7.Stream<_i2.GoogleSignInAccount?>); + + @override + _i7.Future<_i2.GoogleSignInAccount?> signInSilently({ + bool? suppressErrors = true, + bool? reAuthenticate = false, + }) => + (super.noSuchMethod( + Invocation.method( + #signInSilently, + [], + { + #suppressErrors: suppressErrors, + #reAuthenticate: reAuthenticate, + }, + ), + returnValue: _i7.Future<_i2.GoogleSignInAccount?>.value(), + ) as _i7.Future<_i2.GoogleSignInAccount?>); + + @override + _i7.Future isSignedIn() => (super.noSuchMethod( + Invocation.method( + #isSignedIn, + [], + ), + returnValue: _i7.Future.value(false), + ) as _i7.Future); + + @override + _i7.Future<_i2.GoogleSignInAccount?> signIn() => (super.noSuchMethod( + Invocation.method( + #signIn, + [], + ), + returnValue: _i7.Future<_i2.GoogleSignInAccount?>.value(), + ) as _i7.Future<_i2.GoogleSignInAccount?>); + + @override + _i7.Future<_i2.GoogleSignInAccount?> signOut() => (super.noSuchMethod( + Invocation.method( + #signOut, + [], + ), + returnValue: _i7.Future<_i2.GoogleSignInAccount?>.value(), + ) as _i7.Future<_i2.GoogleSignInAccount?>); + + @override + _i7.Future<_i2.GoogleSignInAccount?> disconnect() => (super.noSuchMethod( + Invocation.method( + #disconnect, + [], + ), + returnValue: _i7.Future<_i2.GoogleSignInAccount?>.value(), + ) as _i7.Future<_i2.GoogleSignInAccount?>); + + @override + _i7.Future requestScopes(List? scopes) => (super.noSuchMethod( + Invocation.method( + #requestScopes, + [scopes], + ), + returnValue: _i7.Future.value(false), + ) as _i7.Future); + + @override + _i7.Future canAccessScopes( + List? scopes, { + String? accessToken, + }) => + (super.noSuchMethod( + Invocation.method( + #canAccessScopes, + [scopes], + {#accessToken: accessToken}, + ), + returnValue: _i7.Future.value(false), + ) as _i7.Future); +} + +/// A class which mocks [GoogleSignInAccount]. +/// +/// See the documentation for Mockito's code generation for more information. +// ignore: must_be_immutable +class MockGoogleSignInAccount extends _i1.Mock + implements _i2.GoogleSignInAccount { + MockGoogleSignInAccount() { + _i1.throwOnMissingStub(this); + } + + @override + String get email => (super.noSuchMethod( + Invocation.getter(#email), + returnValue: _i8.dummyValue( + this, + Invocation.getter(#email), + ), + ) as String); + + @override + String get id => (super.noSuchMethod( + Invocation.getter(#id), + returnValue: _i8.dummyValue( + this, + Invocation.getter(#id), + ), + ) as String); + + @override + _i7.Future<_i2.GoogleSignInAuthentication> get authentication => + (super.noSuchMethod( + Invocation.getter(#authentication), + returnValue: _i7.Future<_i2.GoogleSignInAuthentication>.value( + _FakeGoogleSignInAuthentication_0( + this, + Invocation.getter(#authentication), + )), + ) as _i7.Future<_i2.GoogleSignInAuthentication>); + + @override + _i7.Future> get authHeaders => (super.noSuchMethod( + Invocation.getter(#authHeaders), + returnValue: _i7.Future>.value({}), + ) as _i7.Future>); + + @override + _i7.Future clearAuthCache() => (super.noSuchMethod( + Invocation.method( + #clearAuthCache, + [], + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); +} + +/// A class which mocks [GoogleSignInAuthentication]. +/// +/// See the documentation for Mockito's code generation for more information. +class MockGoogleSignInAuthentication extends _i1.Mock + implements _i2.GoogleSignInAuthentication { + MockGoogleSignInAuthentication() { + _i1.throwOnMissingStub(this); + } +} + /// A class which mocks [FirebaseAuth]. /// /// See the documentation for Mockito's code generation for more information. -class MockFirebaseAuth extends _i1.Mock implements _i4.FirebaseAuth { +class MockFirebaseAuth extends _i1.Mock implements _i5.FirebaseAuth { MockFirebaseAuth() { _i1.throwOnMissingStub(this); } @override - _i2.FirebaseApp get app => (super.noSuchMethod( + _i3.FirebaseApp get app => (super.noSuchMethod( Invocation.getter(#app), - returnValue: _FakeFirebaseApp_0( + returnValue: _FakeFirebaseApp_1( this, Invocation.getter(#app), ), - ) as _i2.FirebaseApp); + ) as _i3.FirebaseApp); @override - set app(_i2.FirebaseApp? _app) => super.noSuchMethod( + set app(_i3.FirebaseApp? _app) => super.noSuchMethod( Invocation.setter( #app, _app, @@ -150,17 +340,17 @@ class MockFirebaseAuth extends _i1.Mock implements _i4.FirebaseAuth { ) as Map); @override - _i5.Future useEmulator(String? origin) => (super.noSuchMethod( + _i7.Future useEmulator(String? origin) => (super.noSuchMethod( Invocation.method( #useEmulator, [origin], ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); @override - _i5.Future useAuthEmulator( + _i7.Future useAuthEmulator( String? host, int? port, { bool? automaticHostMapping = true, @@ -174,38 +364,38 @@ class MockFirebaseAuth extends _i1.Mock implements _i4.FirebaseAuth { ], {#automaticHostMapping: automaticHostMapping}, ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); @override - _i5.Future applyActionCode(String? code) => (super.noSuchMethod( + _i7.Future applyActionCode(String? code) => (super.noSuchMethod( Invocation.method( #applyActionCode, [code], ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); @override - _i5.Future<_i3.ActionCodeInfo> checkActionCode(String? code) => + _i7.Future<_i4.ActionCodeInfo> checkActionCode(String? code) => (super.noSuchMethod( Invocation.method( #checkActionCode, [code], ), - returnValue: _i5.Future<_i3.ActionCodeInfo>.value(_FakeActionCodeInfo_1( + returnValue: _i7.Future<_i4.ActionCodeInfo>.value(_FakeActionCodeInfo_2( this, Invocation.method( #checkActionCode, [code], ), )), - ) as _i5.Future<_i3.ActionCodeInfo>); + ) as _i7.Future<_i4.ActionCodeInfo>); @override - _i5.Future confirmPasswordReset({ + _i7.Future confirmPasswordReset({ required String? code, required String? newPassword, }) => @@ -218,12 +408,12 @@ class MockFirebaseAuth extends _i1.Mock implements _i4.FirebaseAuth { #newPassword: newPassword, }, ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); @override - _i5.Future<_i4.UserCredential> createUserWithEmailAndPassword({ + _i7.Future<_i5.UserCredential> createUserWithEmailAndPassword({ required String? email, required String? password, }) => @@ -236,7 +426,7 @@ class MockFirebaseAuth extends _i1.Mock implements _i4.FirebaseAuth { #password: password, }, ), - returnValue: _i5.Future<_i4.UserCredential>.value(_FakeUserCredential_2( + returnValue: _i7.Future<_i5.UserCredential>.value(_FakeUserCredential_3( this, Invocation.method( #createUserWithEmailAndPassword, @@ -247,32 +437,32 @@ class MockFirebaseAuth extends _i1.Mock implements _i4.FirebaseAuth { }, ), )), - ) as _i5.Future<_i4.UserCredential>); + ) as _i7.Future<_i5.UserCredential>); @override - _i5.Future> fetchSignInMethodsForEmail(String? email) => + _i7.Future> fetchSignInMethodsForEmail(String? email) => (super.noSuchMethod( Invocation.method( #fetchSignInMethodsForEmail, [email], ), - returnValue: _i5.Future>.value([]), - ) as _i5.Future>); + returnValue: _i7.Future>.value([]), + ) as _i7.Future>); @override - _i5.Future<_i4.UserCredential> getRedirectResult() => (super.noSuchMethod( + _i7.Future<_i5.UserCredential> getRedirectResult() => (super.noSuchMethod( Invocation.method( #getRedirectResult, [], ), - returnValue: _i5.Future<_i4.UserCredential>.value(_FakeUserCredential_2( + returnValue: _i7.Future<_i5.UserCredential>.value(_FakeUserCredential_3( this, Invocation.method( #getRedirectResult, [], ), )), - ) as _i5.Future<_i4.UserCredential>); + ) as _i7.Future<_i5.UserCredential>); @override bool isSignInWithEmailLink(String? emailLink) => (super.noSuchMethod( @@ -284,36 +474,36 @@ class MockFirebaseAuth extends _i1.Mock implements _i4.FirebaseAuth { ) as bool); @override - _i5.Stream<_i4.User?> authStateChanges() => (super.noSuchMethod( + _i7.Stream<_i5.User?> authStateChanges() => (super.noSuchMethod( Invocation.method( #authStateChanges, [], ), - returnValue: _i5.Stream<_i4.User?>.empty(), - ) as _i5.Stream<_i4.User?>); + returnValue: _i7.Stream<_i5.User?>.empty(), + ) as _i7.Stream<_i5.User?>); @override - _i5.Stream<_i4.User?> idTokenChanges() => (super.noSuchMethod( + _i7.Stream<_i5.User?> idTokenChanges() => (super.noSuchMethod( Invocation.method( #idTokenChanges, [], ), - returnValue: _i5.Stream<_i4.User?>.empty(), - ) as _i5.Stream<_i4.User?>); + returnValue: _i7.Stream<_i5.User?>.empty(), + ) as _i7.Stream<_i5.User?>); @override - _i5.Stream<_i4.User?> userChanges() => (super.noSuchMethod( + _i7.Stream<_i5.User?> userChanges() => (super.noSuchMethod( Invocation.method( #userChanges, [], ), - returnValue: _i5.Stream<_i4.User?>.empty(), - ) as _i5.Stream<_i4.User?>); + returnValue: _i7.Stream<_i5.User?>.empty(), + ) as _i7.Stream<_i5.User?>); @override - _i5.Future sendPasswordResetEmail({ + _i7.Future sendPasswordResetEmail({ required String? email, - _i3.ActionCodeSettings? actionCodeSettings, + _i4.ActionCodeSettings? actionCodeSettings, }) => (super.noSuchMethod( Invocation.method( @@ -324,14 +514,14 @@ class MockFirebaseAuth extends _i1.Mock implements _i4.FirebaseAuth { #actionCodeSettings: actionCodeSettings, }, ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); @override - _i5.Future sendSignInLinkToEmail({ + _i7.Future sendSignInLinkToEmail({ required String? email, - required _i3.ActionCodeSettings? actionCodeSettings, + required _i4.ActionCodeSettings? actionCodeSettings, }) => (super.noSuchMethod( Invocation.method( @@ -342,22 +532,22 @@ class MockFirebaseAuth extends _i1.Mock implements _i4.FirebaseAuth { #actionCodeSettings: actionCodeSettings, }, ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); @override - _i5.Future setLanguageCode(String? languageCode) => (super.noSuchMethod( + _i7.Future setLanguageCode(String? languageCode) => (super.noSuchMethod( Invocation.method( #setLanguageCode, [languageCode], ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); @override - _i5.Future setSettings({ + _i7.Future setSettings({ bool? appVerificationDisabledForTesting = false, String? userAccessGroup, String? phoneNumber, @@ -377,71 +567,71 @@ class MockFirebaseAuth extends _i1.Mock implements _i4.FirebaseAuth { #forceRecaptchaFlow: forceRecaptchaFlow, }, ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); @override - _i5.Future setPersistence(_i3.Persistence? persistence) => + _i7.Future setPersistence(_i4.Persistence? persistence) => (super.noSuchMethod( Invocation.method( #setPersistence, [persistence], ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); @override - _i5.Future<_i4.UserCredential> signInAnonymously() => (super.noSuchMethod( + _i7.Future<_i5.UserCredential> signInAnonymously() => (super.noSuchMethod( Invocation.method( #signInAnonymously, [], ), - returnValue: _i5.Future<_i4.UserCredential>.value(_FakeUserCredential_2( + returnValue: _i7.Future<_i5.UserCredential>.value(_FakeUserCredential_3( this, Invocation.method( #signInAnonymously, [], ), )), - ) as _i5.Future<_i4.UserCredential>); + ) as _i7.Future<_i5.UserCredential>); @override - _i5.Future<_i4.UserCredential> signInWithCredential( - _i3.AuthCredential? credential) => + _i7.Future<_i5.UserCredential> signInWithCredential( + _i4.AuthCredential? credential) => (super.noSuchMethod( Invocation.method( #signInWithCredential, [credential], ), - returnValue: _i5.Future<_i4.UserCredential>.value(_FakeUserCredential_2( + returnValue: _i7.Future<_i5.UserCredential>.value(_FakeUserCredential_3( this, Invocation.method( #signInWithCredential, [credential], ), )), - ) as _i5.Future<_i4.UserCredential>); + ) as _i7.Future<_i5.UserCredential>); @override - _i5.Future<_i4.UserCredential> signInWithCustomToken(String? token) => + _i7.Future<_i5.UserCredential> signInWithCustomToken(String? token) => (super.noSuchMethod( Invocation.method( #signInWithCustomToken, [token], ), - returnValue: _i5.Future<_i4.UserCredential>.value(_FakeUserCredential_2( + returnValue: _i7.Future<_i5.UserCredential>.value(_FakeUserCredential_3( this, Invocation.method( #signInWithCustomToken, [token], ), )), - ) as _i5.Future<_i4.UserCredential>); + ) as _i7.Future<_i5.UserCredential>); @override - _i5.Future<_i4.UserCredential> signInWithEmailAndPassword({ + _i7.Future<_i5.UserCredential> signInWithEmailAndPassword({ required String? email, required String? password, }) => @@ -454,7 +644,7 @@ class MockFirebaseAuth extends _i1.Mock implements _i4.FirebaseAuth { #password: password, }, ), - returnValue: _i5.Future<_i4.UserCredential>.value(_FakeUserCredential_2( + returnValue: _i7.Future<_i5.UserCredential>.value(_FakeUserCredential_3( this, Invocation.method( #signInWithEmailAndPassword, @@ -465,10 +655,10 @@ class MockFirebaseAuth extends _i1.Mock implements _i4.FirebaseAuth { }, ), )), - ) as _i5.Future<_i4.UserCredential>); + ) as _i7.Future<_i5.UserCredential>); @override - _i5.Future<_i4.UserCredential> signInWithEmailLink({ + _i7.Future<_i5.UserCredential> signInWithEmailLink({ required String? email, required String? emailLink, }) => @@ -481,7 +671,7 @@ class MockFirebaseAuth extends _i1.Mock implements _i4.FirebaseAuth { #emailLink: emailLink, }, ), - returnValue: _i5.Future<_i4.UserCredential>.value(_FakeUserCredential_2( + returnValue: _i7.Future<_i5.UserCredential>.value(_FakeUserCredential_3( this, Invocation.method( #signInWithEmailLink, @@ -492,46 +682,46 @@ class MockFirebaseAuth extends _i1.Mock implements _i4.FirebaseAuth { }, ), )), - ) as _i5.Future<_i4.UserCredential>); + ) as _i7.Future<_i5.UserCredential>); @override - _i5.Future<_i4.UserCredential> signInWithAuthProvider( - _i3.AuthProvider? provider) => + _i7.Future<_i5.UserCredential> signInWithAuthProvider( + _i4.AuthProvider? provider) => (super.noSuchMethod( Invocation.method( #signInWithAuthProvider, [provider], ), - returnValue: _i5.Future<_i4.UserCredential>.value(_FakeUserCredential_2( + returnValue: _i7.Future<_i5.UserCredential>.value(_FakeUserCredential_3( this, Invocation.method( #signInWithAuthProvider, [provider], ), )), - ) as _i5.Future<_i4.UserCredential>); + ) as _i7.Future<_i5.UserCredential>); @override - _i5.Future<_i4.UserCredential> signInWithProvider( - _i3.AuthProvider? provider) => + _i7.Future<_i5.UserCredential> signInWithProvider( + _i4.AuthProvider? provider) => (super.noSuchMethod( Invocation.method( #signInWithProvider, [provider], ), - returnValue: _i5.Future<_i4.UserCredential>.value(_FakeUserCredential_2( + returnValue: _i7.Future<_i5.UserCredential>.value(_FakeUserCredential_3( this, Invocation.method( #signInWithProvider, [provider], ), )), - ) as _i5.Future<_i4.UserCredential>); + ) as _i7.Future<_i5.UserCredential>); @override - _i5.Future<_i4.ConfirmationResult> signInWithPhoneNumber( + _i7.Future<_i5.ConfirmationResult> signInWithPhoneNumber( String? phoneNumber, [ - _i4.RecaptchaVerifier? verifier, + _i5.RecaptchaVerifier? verifier, ]) => (super.noSuchMethod( Invocation.method( @@ -542,7 +732,7 @@ class MockFirebaseAuth extends _i1.Mock implements _i4.FirebaseAuth { ], ), returnValue: - _i5.Future<_i4.ConfirmationResult>.value(_FakeConfirmationResult_3( + _i7.Future<_i5.ConfirmationResult>.value(_FakeConfirmationResult_4( this, Invocation.method( #signInWithPhoneNumber, @@ -552,73 +742,73 @@ class MockFirebaseAuth extends _i1.Mock implements _i4.FirebaseAuth { ], ), )), - ) as _i5.Future<_i4.ConfirmationResult>); + ) as _i7.Future<_i5.ConfirmationResult>); @override - _i5.Future<_i4.UserCredential> signInWithPopup(_i3.AuthProvider? provider) => + _i7.Future<_i5.UserCredential> signInWithPopup(_i4.AuthProvider? provider) => (super.noSuchMethod( Invocation.method( #signInWithPopup, [provider], ), - returnValue: _i5.Future<_i4.UserCredential>.value(_FakeUserCredential_2( + returnValue: _i7.Future<_i5.UserCredential>.value(_FakeUserCredential_3( this, Invocation.method( #signInWithPopup, [provider], ), )), - ) as _i5.Future<_i4.UserCredential>); + ) as _i7.Future<_i5.UserCredential>); @override - _i5.Future signInWithRedirect(_i3.AuthProvider? provider) => + _i7.Future signInWithRedirect(_i4.AuthProvider? provider) => (super.noSuchMethod( Invocation.method( #signInWithRedirect, [provider], ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); @override - _i5.Future signOut() => (super.noSuchMethod( + _i7.Future signOut() => (super.noSuchMethod( Invocation.method( #signOut, [], ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); @override - _i5.Future verifyPasswordResetCode(String? code) => + _i7.Future verifyPasswordResetCode(String? code) => (super.noSuchMethod( Invocation.method( #verifyPasswordResetCode, [code], ), - returnValue: _i5.Future.value(_i6.dummyValue( + returnValue: _i7.Future.value(_i8.dummyValue( this, Invocation.method( #verifyPasswordResetCode, [code], ), )), - ) as _i5.Future); + ) as _i7.Future); @override - _i5.Future verifyPhoneNumber({ + _i7.Future verifyPhoneNumber({ String? phoneNumber, - _i3.PhoneMultiFactorInfo? multiFactorInfo, - required _i3.PhoneVerificationCompleted? verificationCompleted, - required _i3.PhoneVerificationFailed? verificationFailed, - required _i3.PhoneCodeSent? codeSent, - required _i3.PhoneCodeAutoRetrievalTimeout? codeAutoRetrievalTimeout, + _i4.PhoneMultiFactorInfo? multiFactorInfo, + required _i4.PhoneVerificationCompleted? verificationCompleted, + required _i4.PhoneVerificationFailed? verificationFailed, + required _i4.PhoneCodeSent? codeSent, + required _i4.PhoneCodeAutoRetrievalTimeout? codeAutoRetrievalTimeout, String? autoRetrievedSmsCodeForTesting, Duration? timeout = const Duration(seconds: 30), int? forceResendingToken, - _i3.MultiFactorSession? multiFactorSession, + _i4.MultiFactorSession? multiFactorSession, }) => (super.noSuchMethod( Invocation.method( @@ -637,27 +827,27 @@ class MockFirebaseAuth extends _i1.Mock implements _i4.FirebaseAuth { #multiFactorSession: multiFactorSession, }, ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); @override - _i5.Future revokeTokenWithAuthorizationCode( + _i7.Future revokeTokenWithAuthorizationCode( String? authorizationCode) => (super.noSuchMethod( Invocation.method( #revokeTokenWithAuthorizationCode, [authorizationCode], ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); } /// A class which mocks [UserCredential]. /// /// See the documentation for Mockito's code generation for more information. -class MockUserCredential extends _i1.Mock implements _i4.UserCredential { +class MockUserCredential extends _i1.Mock implements _i5.UserCredential { MockUserCredential() { _i1.throwOnMissingStub(this); } @@ -666,7 +856,7 @@ class MockUserCredential extends _i1.Mock implements _i4.UserCredential { /// A class which mocks [User]. /// /// See the documentation for Mockito's code generation for more information. -class MockUser extends _i1.Mock implements _i4.User { +class MockUser extends _i1.Mock implements _i5.User { MockUser() { _i1.throwOnMissingStub(this); } @@ -684,184 +874,184 @@ class MockUser extends _i1.Mock implements _i4.User { ) as bool); @override - _i3.UserMetadata get metadata => (super.noSuchMethod( + _i4.UserMetadata get metadata => (super.noSuchMethod( Invocation.getter(#metadata), - returnValue: _FakeUserMetadata_4( + returnValue: _FakeUserMetadata_5( this, Invocation.getter(#metadata), ), - ) as _i3.UserMetadata); + ) as _i4.UserMetadata); @override - List<_i3.UserInfo> get providerData => (super.noSuchMethod( + List<_i4.UserInfo> get providerData => (super.noSuchMethod( Invocation.getter(#providerData), - returnValue: <_i3.UserInfo>[], - ) as List<_i3.UserInfo>); + returnValue: <_i4.UserInfo>[], + ) as List<_i4.UserInfo>); @override String get uid => (super.noSuchMethod( Invocation.getter(#uid), - returnValue: _i6.dummyValue( + returnValue: _i8.dummyValue( this, Invocation.getter(#uid), ), ) as String); @override - _i4.MultiFactor get multiFactor => (super.noSuchMethod( + _i5.MultiFactor get multiFactor => (super.noSuchMethod( Invocation.getter(#multiFactor), - returnValue: _FakeMultiFactor_5( + returnValue: _FakeMultiFactor_6( this, Invocation.getter(#multiFactor), ), - ) as _i4.MultiFactor); + ) as _i5.MultiFactor); @override - _i5.Future delete() => (super.noSuchMethod( + _i7.Future delete() => (super.noSuchMethod( Invocation.method( #delete, [], ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); @override - _i5.Future getIdToken([bool? forceRefresh = false]) => + _i7.Future getIdToken([bool? forceRefresh = false]) => (super.noSuchMethod( Invocation.method( #getIdToken, [forceRefresh], ), - returnValue: _i5.Future.value(), - ) as _i5.Future); + returnValue: _i7.Future.value(), + ) as _i7.Future); @override - _i5.Future<_i3.IdTokenResult> getIdTokenResult( + _i7.Future<_i4.IdTokenResult> getIdTokenResult( [bool? forceRefresh = false]) => (super.noSuchMethod( Invocation.method( #getIdTokenResult, [forceRefresh], ), - returnValue: _i5.Future<_i3.IdTokenResult>.value(_FakeIdTokenResult_6( + returnValue: _i7.Future<_i4.IdTokenResult>.value(_FakeIdTokenResult_7( this, Invocation.method( #getIdTokenResult, [forceRefresh], ), )), - ) as _i5.Future<_i3.IdTokenResult>); + ) as _i7.Future<_i4.IdTokenResult>); @override - _i5.Future<_i4.UserCredential> linkWithCredential( - _i3.AuthCredential? credential) => + _i7.Future<_i5.UserCredential> linkWithCredential( + _i4.AuthCredential? credential) => (super.noSuchMethod( Invocation.method( #linkWithCredential, [credential], ), - returnValue: _i5.Future<_i4.UserCredential>.value(_FakeUserCredential_2( + returnValue: _i7.Future<_i5.UserCredential>.value(_FakeUserCredential_3( this, Invocation.method( #linkWithCredential, [credential], ), )), - ) as _i5.Future<_i4.UserCredential>); + ) as _i7.Future<_i5.UserCredential>); @override - _i5.Future<_i4.UserCredential> linkWithProvider(_i3.AuthProvider? provider) => + _i7.Future<_i5.UserCredential> linkWithProvider(_i4.AuthProvider? provider) => (super.noSuchMethod( Invocation.method( #linkWithProvider, [provider], ), - returnValue: _i5.Future<_i4.UserCredential>.value(_FakeUserCredential_2( + returnValue: _i7.Future<_i5.UserCredential>.value(_FakeUserCredential_3( this, Invocation.method( #linkWithProvider, [provider], ), )), - ) as _i5.Future<_i4.UserCredential>); + ) as _i7.Future<_i5.UserCredential>); @override - _i5.Future<_i4.UserCredential> reauthenticateWithProvider( - _i3.AuthProvider? provider) => + _i7.Future<_i5.UserCredential> reauthenticateWithProvider( + _i4.AuthProvider? provider) => (super.noSuchMethod( Invocation.method( #reauthenticateWithProvider, [provider], ), - returnValue: _i5.Future<_i4.UserCredential>.value(_FakeUserCredential_2( + returnValue: _i7.Future<_i5.UserCredential>.value(_FakeUserCredential_3( this, Invocation.method( #reauthenticateWithProvider, [provider], ), )), - ) as _i5.Future<_i4.UserCredential>); + ) as _i7.Future<_i5.UserCredential>); @override - _i5.Future<_i4.UserCredential> reauthenticateWithPopup( - _i3.AuthProvider? provider) => + _i7.Future<_i5.UserCredential> reauthenticateWithPopup( + _i4.AuthProvider? provider) => (super.noSuchMethod( Invocation.method( #reauthenticateWithPopup, [provider], ), - returnValue: _i5.Future<_i4.UserCredential>.value(_FakeUserCredential_2( + returnValue: _i7.Future<_i5.UserCredential>.value(_FakeUserCredential_3( this, Invocation.method( #reauthenticateWithPopup, [provider], ), )), - ) as _i5.Future<_i4.UserCredential>); + ) as _i7.Future<_i5.UserCredential>); @override - _i5.Future reauthenticateWithRedirect(_i3.AuthProvider? provider) => + _i7.Future reauthenticateWithRedirect(_i4.AuthProvider? provider) => (super.noSuchMethod( Invocation.method( #reauthenticateWithRedirect, [provider], ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); @override - _i5.Future<_i4.UserCredential> linkWithPopup(_i3.AuthProvider? provider) => + _i7.Future<_i5.UserCredential> linkWithPopup(_i4.AuthProvider? provider) => (super.noSuchMethod( Invocation.method( #linkWithPopup, [provider], ), - returnValue: _i5.Future<_i4.UserCredential>.value(_FakeUserCredential_2( + returnValue: _i7.Future<_i5.UserCredential>.value(_FakeUserCredential_3( this, Invocation.method( #linkWithPopup, [provider], ), )), - ) as _i5.Future<_i4.UserCredential>); + ) as _i7.Future<_i5.UserCredential>); @override - _i5.Future linkWithRedirect(_i3.AuthProvider? provider) => + _i7.Future linkWithRedirect(_i4.AuthProvider? provider) => (super.noSuchMethod( Invocation.method( #linkWithRedirect, [provider], ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); @override - _i5.Future<_i4.ConfirmationResult> linkWithPhoneNumber( + _i7.Future<_i5.ConfirmationResult> linkWithPhoneNumber( String? phoneNumber, [ - _i4.RecaptchaVerifier? verifier, + _i5.RecaptchaVerifier? verifier, ]) => (super.noSuchMethod( Invocation.method( @@ -872,7 +1062,7 @@ class MockUser extends _i1.Mock implements _i4.User { ], ), returnValue: - _i5.Future<_i4.ConfirmationResult>.value(_FakeConfirmationResult_3( + _i7.Future<_i5.ConfirmationResult>.value(_FakeConfirmationResult_4( this, Invocation.method( #linkWithPhoneNumber, @@ -882,117 +1072,117 @@ class MockUser extends _i1.Mock implements _i4.User { ], ), )), - ) as _i5.Future<_i4.ConfirmationResult>); + ) as _i7.Future<_i5.ConfirmationResult>); @override - _i5.Future<_i4.UserCredential> reauthenticateWithCredential( - _i3.AuthCredential? credential) => + _i7.Future<_i5.UserCredential> reauthenticateWithCredential( + _i4.AuthCredential? credential) => (super.noSuchMethod( Invocation.method( #reauthenticateWithCredential, [credential], ), - returnValue: _i5.Future<_i4.UserCredential>.value(_FakeUserCredential_2( + returnValue: _i7.Future<_i5.UserCredential>.value(_FakeUserCredential_3( this, Invocation.method( #reauthenticateWithCredential, [credential], ), )), - ) as _i5.Future<_i4.UserCredential>); + ) as _i7.Future<_i5.UserCredential>); @override - _i5.Future reload() => (super.noSuchMethod( + _i7.Future reload() => (super.noSuchMethod( Invocation.method( #reload, [], ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); @override - _i5.Future sendEmailVerification( - [_i3.ActionCodeSettings? actionCodeSettings]) => + _i7.Future sendEmailVerification( + [_i4.ActionCodeSettings? actionCodeSettings]) => (super.noSuchMethod( Invocation.method( #sendEmailVerification, [actionCodeSettings], ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); @override - _i5.Future<_i4.User> unlink(String? providerId) => (super.noSuchMethod( + _i7.Future<_i5.User> unlink(String? providerId) => (super.noSuchMethod( Invocation.method( #unlink, [providerId], ), - returnValue: _i5.Future<_i4.User>.value(_FakeUser_7( + returnValue: _i7.Future<_i5.User>.value(_FakeUser_8( this, Invocation.method( #unlink, [providerId], ), )), - ) as _i5.Future<_i4.User>); + ) as _i7.Future<_i5.User>); @override - _i5.Future updateEmail(String? newEmail) => (super.noSuchMethod( + _i7.Future updateEmail(String? newEmail) => (super.noSuchMethod( Invocation.method( #updateEmail, [newEmail], ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); @override - _i5.Future updatePassword(String? newPassword) => (super.noSuchMethod( + _i7.Future updatePassword(String? newPassword) => (super.noSuchMethod( Invocation.method( #updatePassword, [newPassword], ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); @override - _i5.Future updatePhoneNumber( - _i3.PhoneAuthCredential? phoneCredential) => + _i7.Future updatePhoneNumber( + _i4.PhoneAuthCredential? phoneCredential) => (super.noSuchMethod( Invocation.method( #updatePhoneNumber, [phoneCredential], ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); @override - _i5.Future updateDisplayName(String? displayName) => + _i7.Future updateDisplayName(String? displayName) => (super.noSuchMethod( Invocation.method( #updateDisplayName, [displayName], ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); @override - _i5.Future updatePhotoURL(String? photoURL) => (super.noSuchMethod( + _i7.Future updatePhotoURL(String? photoURL) => (super.noSuchMethod( Invocation.method( #updatePhotoURL, [photoURL], ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); @override - _i5.Future updateProfile({ + _i7.Future updateProfile({ String? displayName, String? photoURL, }) => @@ -1005,14 +1195,14 @@ class MockUser extends _i1.Mock implements _i4.User { #photoURL: photoURL, }, ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); @override - _i5.Future verifyBeforeUpdateEmail( + _i7.Future verifyBeforeUpdateEmail( String? newEmail, [ - _i3.ActionCodeSettings? actionCodeSettings, + _i4.ActionCodeSettings? actionCodeSettings, ]) => (super.noSuchMethod( Invocation.method( @@ -1022,15 +1212,15 @@ class MockUser extends _i1.Mock implements _i4.User { actionCodeSettings, ], ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); } /// A class which mocks [UserInfo]. /// /// See the documentation for Mockito's code generation for more information. -class MockUserInfo extends _i1.Mock implements _i3.UserInfo { +class MockUserInfo extends _i1.Mock implements _i4.UserInfo { MockUserInfo() { _i1.throwOnMissingStub(this); } @@ -1038,7 +1228,7 @@ class MockUserInfo extends _i1.Mock implements _i3.UserInfo { @override String get providerId => (super.noSuchMethod( Invocation.getter(#providerId), - returnValue: _i6.dummyValue( + returnValue: _i8.dummyValue( this, Invocation.getter(#providerId), ),