This commit is contained in:
2026-06-29 16:04:15 +03:00
parent 58bfc6b12c
commit 4f56e4983c
13 changed files with 869 additions and 7 deletions
@@ -0,0 +1,21 @@
import 'dart:async';
import 'package:google_sign_in/google_sign_in.dart';
class GoogleAuthService {
final GoogleSignIn _googleSignIn;
GoogleAuthService() : _googleSignIn = GoogleSignIn(scopes: ['email']);
GoogleSignInAccount? get currentUser => _googleSignIn.currentUser;
Stream<GoogleSignInAccount?> get onCurrentUserChanged =>
_googleSignIn.onCurrentUserChanged;
Future<void> signIn() async {
await _googleSignIn.signIn();
}
Future<void> signOut() async {
await _googleSignIn.signOut();
}
}