-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4cf97a9
commit 38bc4d3
Showing
13 changed files
with
225 additions
and
49 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
File renamed without changes.
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 @@ | ||
{"flutter":{"platforms":{"android":{"default":{"projectId":"gsoc-24-3f4d1","appId":"1:211384953661:android:14233d29467afa30317354","fileOutput":"android/app/google-services.json"}},"dart":{"lib/firebase_options.dart":{"projectId":"gsoc-24-3f4d1","configurations":{"android":"1:211384953661:android:14233d29467afa30317354","ios":"1:211384953661:ios:007f4e6da5f618ea317354"}}}}}} |
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,69 @@ | ||
// File generated by FlutterFire CLI. | ||
// ignore_for_file: type=lint | ||
import 'package:firebase_core/firebase_core.dart' show FirebaseOptions; | ||
import 'package:flutter/foundation.dart' | ||
show defaultTargetPlatform, kIsWeb, TargetPlatform; | ||
|
||
/// Default [FirebaseOptions] for use with your Firebase apps. | ||
/// | ||
/// Example: | ||
/// ```dart | ||
/// import 'firebase_options.dart'; | ||
/// // ... | ||
/// await Firebase.initializeApp( | ||
/// options: DefaultFirebaseOptions.currentPlatform, | ||
/// ); | ||
/// ``` | ||
class DefaultFirebaseOptions { | ||
static FirebaseOptions get currentPlatform { | ||
if (kIsWeb) { | ||
throw UnsupportedError( | ||
'DefaultFirebaseOptions have not been configured for web - ' | ||
'you can reconfigure this by running the FlutterFire CLI again.', | ||
); | ||
} | ||
switch (defaultTargetPlatform) { | ||
case TargetPlatform.android: | ||
return android; | ||
case TargetPlatform.iOS: | ||
return ios; | ||
case TargetPlatform.macOS: | ||
throw UnsupportedError( | ||
'DefaultFirebaseOptions have not been configured for macos - ' | ||
'you can reconfigure this by running the FlutterFire CLI again.', | ||
); | ||
case TargetPlatform.windows: | ||
throw UnsupportedError( | ||
'DefaultFirebaseOptions have not been configured for windows - ' | ||
'you can reconfigure this by running the FlutterFire CLI again.', | ||
); | ||
case TargetPlatform.linux: | ||
throw UnsupportedError( | ||
'DefaultFirebaseOptions have not been configured for linux - ' | ||
'you can reconfigure this by running the FlutterFire CLI again.', | ||
); | ||
default: | ||
throw UnsupportedError( | ||
'DefaultFirebaseOptions are not supported for this platform.', | ||
); | ||
} | ||
} | ||
|
||
static const FirebaseOptions android = FirebaseOptions( | ||
apiKey: 'AIzaSyAO1F8fTW1EG88fnnTTFRJiKXH4I-MHlbI', | ||
appId: '1:211384953661:android:14233d29467afa30317354', | ||
messagingSenderId: '211384953661', | ||
projectId: 'gsoc-24-3f4d1', | ||
storageBucket: 'gsoc-24-3f4d1.appspot.com', | ||
); | ||
|
||
static const FirebaseOptions ios = FirebaseOptions( | ||
apiKey: 'AIzaSyAfe7Be2vESlx3uSGQs_zZ12QWN-EdBgGs', | ||
appId: '1:211384953661:ios:007f4e6da5f618ea317354', | ||
messagingSenderId: '211384953661', | ||
projectId: 'gsoc-24-3f4d1', | ||
storageBucket: 'gsoc-24-3f4d1.appspot.com', | ||
iosClientId: '211384953661-9hkosute6of7qapl18kjacl04m6f14ko.apps.googleusercontent.com', | ||
iosBundleId: 'com.example.firebaseEditorGsoc', | ||
); | ||
} |
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 |
---|---|---|
@@ -1,57 +1,36 @@ | ||
|
||
import 'package:firebase_editor_gsoc/views/circle_widget.dart'; | ||
import 'package:firebase_editor_gsoc/views/custom_drawer.dart'; | ||
import 'package:firebase_editor_gsoc/views/define_schema.dart'; | ||
import 'package:flutter/material.dart'; | ||
import 'user_profile.dart'; | ||
import 'package:google_sign_in/google_sign_in.dart'; | ||
|
||
|
||
class HomeScreen extends StatelessWidget { | ||
final GoogleSignIn googleSignIn = GoogleSignIn(); | ||
|
||
void _handleSignOut(BuildContext context) async { | ||
try { | ||
await googleSignIn.signOut(); | ||
// Navigate to the sign-in screen after signing out | ||
Navigator.pop(context); | ||
} catch (error) { | ||
print('Error signing out: $error'); | ||
// Handle sign-out error | ||
} | ||
} | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return Scaffold( | ||
drawer: CustomDrawer(), | ||
appBar: AppBar( | ||
title: Text('Home'), | ||
backgroundColor: Theme.of(context).appBarTheme.backgroundColor, | ||
actions: <Widget>[ | ||
IconButton( | ||
icon: Icon(Icons.exit_to_app), | ||
onPressed: () => _handleSignOut(context), | ||
), | ||
], | ||
), | ||
body: Center( | ||
child: Column( | ||
mainAxisAlignment: MainAxisAlignment.center, | ||
children: [ | ||
|
||
Icon(Icons.handyman), | ||
Text("Under Developement", | ||
style: Theme.of(context).textTheme.displayLarge?.copyWith( | ||
color: Colors.grey, | ||
fontSize: 30.0 | ||
) | ||
,) | ||
// ElevatedButton( | ||
// onPressed: () { | ||
// Navigator.push( | ||
// context, | ||
// MaterialPageRoute( | ||
// builder: (context) => UserProfile(), | ||
// ), | ||
// ); | ||
// }, | ||
// child: Text('Go to User Profile'), | ||
// ), | ||
// | ||
// ElevatedButton( | ||
// onPressed: () { | ||
// Navigator.push( | ||
// context, | ||
// MaterialPageRoute( | ||
// builder: (context) => DefineSchema(), | ||
// ), | ||
// ); | ||
// }, | ||
// child: Text('Go to Define Schema'), | ||
// ), | ||
], | ||
), | ||
child: Text('Welcome to Home Screen'), | ||
), | ||
); | ||
} | ||
} | ||
} |
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,39 @@ | ||
import 'package:flutter/material.dart'; | ||
import 'package:google_sign_in/google_sign_in.dart'; | ||
import 'package:firebase_editor_gsoc/home_screen.dart'; | ||
|
||
|
||
|
||
class SignInScreen extends StatelessWidget { | ||
final GoogleSignIn googleSignIn = GoogleSignIn(); | ||
|
||
void _handleSignIn(BuildContext context) async { | ||
try { | ||
print("IN SIGN IN METHOD"); | ||
await googleSignIn.signIn(); | ||
// Navigate to the next screen or perform other actions after successful sign-in | ||
Navigator.push( | ||
context, | ||
MaterialPageRoute(builder: (context) => HomeScreen()), | ||
); | ||
} catch (error) { | ||
print('Error signing in with Google: $error'); | ||
// Handle sign-in error | ||
} | ||
} | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return Scaffold( | ||
appBar: AppBar( | ||
title: Text('Sign In'), | ||
), | ||
body: Center( | ||
child: ElevatedButton( | ||
onPressed: () => _handleSignIn(context), | ||
child: Text('Sign in with Google'), | ||
), | ||
), | ||
); | ||
} | ||
} |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,8 @@ | |
# | ||
|
||
list(APPEND FLUTTER_PLUGIN_LIST | ||
firebase_auth | ||
firebase_core | ||
) | ||
|
||
list(APPEND FLUTTER_FFI_PLUGIN_LIST | ||
|