1+ import 'package:firebase_app_web/Service/Auth_Service.dart' ;
12import 'package:firebase_app_web/pages/SignUpPage.dart' ;
23import 'package:flutter/material.dart' ;
34import 'package:flutter_svg/flutter_svg.dart' ;
@@ -17,6 +18,7 @@ class _SignInPageState extends State<SignInPage> {
1718 TextEditingController _emailController = TextEditingController ();
1819 TextEditingController _pwdController = TextEditingController ();
1920 bool circular = false ;
21+ AuthClass authClass = AuthClass ();
2022
2123 @override
2224 Widget build (BuildContext context) {
@@ -40,11 +42,13 @@ class _SignInPageState extends State<SignInPage> {
4042 SizedBox (
4143 height: 20 ,
4244 ),
43- buttonItem ("assets/google.svg" , "Continue with Google" , 25 ),
45+ buttonItem ("assets/google.svg" , "Continue with Google" , 25 , () {
46+ authClass.googleSignIn (context);
47+ }),
4448 SizedBox (
4549 height: 15 ,
4650 ),
47- buttonItem ("assets/phone.svg" , "Continue with Mobile" , 30 ),
51+ buttonItem ("assets/phone.svg" , "Continue with Mobile" , 30 , () {} ),
4852 SizedBox (
4953 height: 18 ,
5054 ),
@@ -162,39 +166,43 @@ class _SignInPageState extends State<SignInPage> {
162166 );
163167 }
164168
165- Widget buttonItem (String imagepath, String buttonName, double size) {
166- return Container (
167- width: MediaQuery .of (context).size.width - 60 ,
168- height: 60 ,
169- child: Card (
170- color: Colors .black,
171- elevation: 8 ,
172- shape: RoundedRectangleBorder (
173- borderRadius: BorderRadius .circular (15 ),
174- side: BorderSide (
175- width: 1 ,
176- color: Colors .grey,
177- ),
178- ),
179- child: Row (
180- mainAxisAlignment: MainAxisAlignment .center,
181- children: [
182- SvgPicture .asset (
183- imagepath,
184- height: size,
185- width: size,
186- ),
187- SizedBox (
188- width: 15 ,
169+ Widget buttonItem (
170+ String imagepath, String buttonName, double size, Function onTap) {
171+ return InkWell (
172+ onTap: onTap,
173+ child: Container (
174+ width: MediaQuery .of (context).size.width - 60 ,
175+ height: 60 ,
176+ child: Card (
177+ color: Colors .black,
178+ elevation: 8 ,
179+ shape: RoundedRectangleBorder (
180+ borderRadius: BorderRadius .circular (15 ),
181+ side: BorderSide (
182+ width: 1 ,
183+ color: Colors .grey,
189184 ),
190- Text (
191- buttonName,
192- style: TextStyle (
193- color: Colors .white,
194- fontSize: 17 ,
185+ ),
186+ child: Row (
187+ mainAxisAlignment: MainAxisAlignment .center,
188+ children: [
189+ SvgPicture .asset (
190+ imagepath,
191+ height: size,
192+ width: size,
195193 ),
196- ),
197- ],
194+ SizedBox (
195+ width: 15 ,
196+ ),
197+ Text (
198+ buttonName,
199+ style: TextStyle (
200+ color: Colors .white,
201+ fontSize: 17 ,
202+ ),
203+ ),
204+ ],
205+ ),
198206 ),
199207 ),
200208 );
0 commit comments