Skip to content

Instantly share code, notes, and snippets.

@ptruiz
Created October 12, 2020 18:36
Show Gist options
  • Save ptruiz/9b2e174b0e5091db9490d956bf16491e to your computer and use it in GitHub Desktop.
Save ptruiz/9b2e174b0e5091db9490d956bf16491e to your computer and use it in GitHub Desktop.
import 'package:firebase_core/firebase_core.dart';
import 'package:flutter/material.dart';
Future<void> main() async {
WidgetsFlutterBinding.ensureInitialized();
await Firebase.initializeApp();
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Auth Demo',
theme: ThemeData(
primarySwatch: Colors.green,
),
home: MyHomePage(title: 'Flutter Auth Demo'),
);
}
}
class MyHomePage extends StatefulWidget {
MyHomePage({Key key, this.title}) : super(key: key);
final String title;
@override
_MyHomePageState createState() => _MyHomePageState();
}
class _MyHomePageState extends State<MyHomePage> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text(widget.title),
),
body: Center(
child: Column(children: [
Text("Hello World")
],)
),
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment