Created
April 21, 2019 03:04
-
-
Save jadehopepunk/fb64378ddf1de4e62aee7c72cdcbc9c1 to your computer and use it in GitHub Desktop.
Function as child containing state
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
class MyApp extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
var auth = new Auth(); | |
return MaterialApp( | |
title: 'Pod', | |
debugShowCheckedModeBanner: false, | |
theme: ThemeData(primarySwatch: Colors.amber), | |
home: WithAuth(auth: auth, builder: (user) => DummyRootPage())); | |
} | |
} | |
class DummyRootPage extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return Scaffold( | |
appBar: AppBar(), | |
drawer: Drawer( | |
child: Text("drawer"), | |
), | |
body: Text('body')); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment