Skip to content

Instantly share code, notes, and snippets.

@Chetan11-dev
Last active September 8, 2020 15:59
Show Gist options
  • Save Chetan11-dev/4160fc72ed883772df3e0e81616d8e89 to your computer and use it in GitHub Desktop.
Save Chetan11-dev/4160fc72ed883772df3e0e81616d8e89 to your computer and use it in GitHub Desktop.
// 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