Skip to content

Commit ec2f41b

Browse files
Fixed Google Sign in on Web (#19)
1 parent 7c0c675 commit ec2f41b

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

lib/screens/Authentication/login_page.dart

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import "package:ChatGemini/screens/Home/home_page.dart";
66
import "package:ChatGemini/services/auth_service.dart";
77
import "package:firebase_auth/firebase_auth.dart";
88
import "package:flutter/material.dart";
9+
import 'package:flutter/foundation.dart' show kIsWeb;
910

1011
class LoginPage extends StatefulWidget {
1112
final Function? onTap;
@@ -161,14 +162,8 @@ class _LoginPageState extends State<LoginPage> {
161162
children: [
162163
Squaretile(
163164
imagePath: "lib/assets/images/google.png",
164-
onTap: () => AuthService().signInWithGoogle(),
165+
onTap: () => (AuthService().signInWithGoogle()),
165166
),
166-
// const SizedBox(width: 10),
167-
// Squaretile(
168-
// // imagePath: "lib/assets/images/apple.png",
169-
// imagePath: "lib/assets/images/Apple_logo_white.png",
170-
// onTap: () {},
171-
// )
172167
],
173168
),
174169
const SizedBox(height: 30),

web/index.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@
2525
<meta name="apple-mobile-web-app-status-bar-style" content="black">
2626
<meta name="apple-mobile-web-app-title" content="ChatGemini">
2727
<link rel="apple-touch-icon" href="icons/Icon-192.png">
28+
<meta name="google-signin-client_id" content="317796345447-8dj4bvl9u0n97sj5n4tmli8dhsdr0sef.apps.googleusercontent.com">
29+
2830

2931
<!-- Favicon -->
3032
<link rel="icon" type="image/png" href="favicon.png"/>

0 commit comments

Comments
 (0)