Last active
September 8, 2020 15:59
-
-
Save Chetan11-dev/4160fc72ed883772df3e0e81616d8e89 to your computer and use it in GitHub Desktop.
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
// import 'package:allsirsa/temp.dart' show TempApp; | |
import 'package:flutter/material.dart'; | |
import 'package:effortless_firebase_auth/effortless_firebase_auth.dart'; | |
import 'package:firebase_auth/firebase_auth.dart'; | |
import 'package:firebase_core/firebase_core.dart'; | |
Future<void> main() async { | |
WidgetsFlutterBinding.ensureInitialized(); | |
await Firebase.initializeApp(); | |
runApp(MyApp()); | |
} | |
class MyApp extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return MaterialApp( | |
title: 'Easy Auth', | |
debugShowCheckedModeBanner: false, | |
home: SignIn( | |
themeColor: Colors.red, | |
// Sign in and Sign Up fields are customizable in EmailConfig | |
methods: [Google(), Email(config: EmailConfig())], | |
auth: FirebaseAuth.instance, | |
onSuccess: (user, context, fields) { | |
showSnackBar( | |
'You made the signUp flow in record time. Cheers.', context); | |
print('user: $user \n fields: $fields'); | |
}, | |
), | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment