step 14 : fix bug loginscreen current user from package google sign in
This commit is contained in:
@@ -32,8 +32,10 @@ class HomeScreen extends HookConsumerWidget {
|
||||
ref.watch(currentCheckJamPresensiProvider);
|
||||
final positionLatitude = useState<String>("");
|
||||
final positionLongitude = useState<String>("");
|
||||
GoogleSignInAccount? currentUserGoogle =
|
||||
ref.watch(currentUserGoogleProvider);
|
||||
// GoogleSignInAccount? currentUserGoogle =
|
||||
// ref.watch(currentUserGoogleProvider);
|
||||
|
||||
final googleSignIn = ref.watch(googleSignInProvider);
|
||||
|
||||
useEffect(() {
|
||||
WidgetsBinding.instance.addPostFrameCallback((timeStamp) async {
|
||||
@@ -281,7 +283,7 @@ class HomeScreen extends HookConsumerWidget {
|
||||
right: Constant.getActualXPhone(context: context, x: 27),
|
||||
),
|
||||
child: Container(
|
||||
child: (currentUserGoogle == null)
|
||||
child: (googleSignIn.currentUser == null)
|
||||
? Center(
|
||||
child: CircularProgressIndicator(),
|
||||
)
|
||||
@@ -296,12 +298,13 @@ class HomeScreen extends HookConsumerWidget {
|
||||
// ),
|
||||
// ),
|
||||
leading: GoogleUserCircleAvatar(
|
||||
identity: currentUserGoogle,
|
||||
identity: googleSignIn.currentUser!,
|
||||
),
|
||||
title: Text(
|
||||
// "Stephen Kusumo",
|
||||
// selectedUser?.model.name ?? "",
|
||||
currentUserGoogle.displayName ?? "",
|
||||
// currentUserGoogle.displayName ?? "",
|
||||
googleSignIn.currentUser?.displayName ?? "",
|
||||
overflow: TextOverflow.ellipsis,
|
||||
style: Constant.titleH1_700(context: context)
|
||||
..copyWith(
|
||||
@@ -311,7 +314,8 @@ class HomeScreen extends HookConsumerWidget {
|
||||
subtitle: Text(
|
||||
// "Step@example.com",
|
||||
// currentUserGoogle?.email ?? "",
|
||||
selectedUser?.model.email ?? "",
|
||||
// selectedUser?.model.email ?? "",
|
||||
googleSignIn.currentUser?.email ?? "",
|
||||
style:
|
||||
Constant.subtitle_500_12(context: context)
|
||||
.copyWith(
|
||||
|
||||
Reference in New Issue
Block a user