4. ubah login_screen jadi hook consumer widget

This commit is contained in:
sindhu
2024-01-09 10:40:32 +07:00
parent e686c6f7a1
commit 7bbce2f3fd
3 changed files with 50 additions and 39 deletions

View File

@@ -0,0 +1,13 @@
import 'package:google_sign_in/google_sign_in.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
final googleSignInProvider = StateProvider<GoogleSignIn>((ref) {
return GoogleSignIn(
scopes: [
'email',
'https://www.googleapis.com/auth/contacts.readonly',
],
);
});
final currentUserProvider = StateProvider<GoogleSignInAccount?>((ref) => null);