mirror of
https://github.com/flutter/samples.git
synced 2025-11-13 00:08:24 +00:00
Upgrading samples to flutter_lints, part 1 of n (#804)
This commit is contained in:
@@ -12,8 +12,10 @@ class FirebaseAuthService implements Auth {
|
||||
final GoogleSignIn _googleSignIn = GoogleSignIn();
|
||||
final FirebaseAuth _auth = FirebaseAuth.instance;
|
||||
|
||||
@override
|
||||
Future<bool> get isSignedIn => _googleSignIn.isSignedIn();
|
||||
|
||||
@override
|
||||
Future<User> signIn() async {
|
||||
try {
|
||||
return await _signIn();
|
||||
@@ -41,6 +43,7 @@ class FirebaseAuthService implements Auth {
|
||||
return _FirebaseUser(authResult.user.uid);
|
||||
}
|
||||
|
||||
@override
|
||||
Future<void> signOut() async {
|
||||
await Future.wait([
|
||||
_auth.signOut(),
|
||||
@@ -50,6 +53,7 @@ class FirebaseAuthService implements Auth {
|
||||
}
|
||||
|
||||
class _FirebaseUser implements User {
|
||||
@override
|
||||
final String uid;
|
||||
|
||||
_FirebaseUser(this.uid);
|
||||
|
||||
@@ -7,6 +7,7 @@ import 'dart:math';
|
||||
import 'auth.dart';
|
||||
|
||||
class MockAuthService implements Auth {
|
||||
@override
|
||||
Future<bool> get isSignedIn async => false;
|
||||
|
||||
@override
|
||||
@@ -26,5 +27,6 @@ class MockAuthService implements Auth {
|
||||
}
|
||||
|
||||
class MockUser implements User {
|
||||
@override
|
||||
String get uid => "123";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user