-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
flask backend integrated and onboarding screens added
- Loading branch information
1 parent
e6bee1e
commit b932d75
Showing
45 changed files
with
1,003 additions
and
331 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file modified
BIN
+13.3 KB
(230%)
ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-113 Bytes
(62%)
ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+34 Bytes
(110%)
ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+280 Bytes
(160%)
ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+30 Bytes
(110%)
ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+246 Bytes
(150%)
ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+583 Bytes
(180%)
ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+34 Bytes
(110%)
ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+550 Bytes
(190%)
ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+1.01 KB
(220%)
ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+1.01 KB
(220%)
ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+1.37 KB
(180%)
ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+295 Bytes
(140%)
ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+1.28 KB
(210%)
ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+1.39 KB
(200%)
ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
import 'dart:async'; | ||
|
||
import 'package:anom_alert/screens/auth/main_page.dart'; | ||
import 'package:flutter/material.dart'; | ||
import 'package:google_sign_in/google_sign_in.dart'; | ||
import 'package:google_fonts/google_fonts.dart'; | ||
import 'package:firebase_auth/firebase_auth.dart'; | ||
|
||
Future<UserCredential> signInWithGoogle() async { | ||
// Trigger the authentication flow | ||
final GoogleSignInAccount? googleUser = await GoogleSignIn().signIn(); | ||
|
||
// Obtain the auth details from the request | ||
final GoogleSignInAuthentication? googleAuth = | ||
await googleUser?.authentication; | ||
|
||
// Create a new credential | ||
final credential = GoogleAuthProvider.credential( | ||
accessToken: googleAuth?.accessToken, | ||
idToken: googleAuth?.idToken, | ||
); | ||
|
||
// Once signed in, return the UserCredential | ||
const MainPage(); | ||
return await FirebaseAuth.instance.signInWithCredential(credential); | ||
} | ||
|
||
Future<void> _googleSignIn() async { | ||
await signInWithGoogle(); | ||
const MainPage(); | ||
} | ||
|
||
class GoogleSignInAuth extends StatelessWidget { | ||
const GoogleSignInAuth({super.key}); | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return OutlinedButton( | ||
onPressed: _googleSignIn, | ||
child: Row( | ||
mainAxisAlignment: MainAxisAlignment.center, | ||
children: [ | ||
const Image( | ||
image: AssetImage("assets/images/google-logo.png"), | ||
height: 24, | ||
width: 24, | ||
), | ||
const SizedBox( | ||
width: 4, | ||
), | ||
Text( | ||
"Login with Google", | ||
style: GoogleFonts.urbanist(), | ||
), | ||
], | ||
)); | ||
} | ||
} |
Oops, something went wrong.