Created
August 11, 2020 19:56
-
-
Save bradcypert/24689b2afaa80279e86fc7e5c17b5fff to your computer and use it in GitHub Desktop.
This file contains hidden or 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:flutter/material.dart'; | |
final Color darkBlue = Color.fromARGB(255, 18, 32, 47); | |
void main() { | |
runApp(MyApp()); | |
} | |
class MyApp extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return MaterialApp( | |
theme: ThemeData.dark().copyWith(scaffoldBackgroundColor: darkBlue), | |
debugShowCheckedModeBanner: false, | |
initialRoute: '/1', | |
routes: { | |
'/1': (ctx) => Widget1(), | |
'/2': (ctx) => Widget2(), | |
'/3': (ctx) => Widget3(), | |
} | |
); | |
} | |
} | |
class Widget1 extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return Scaffold( | |
drawer: Drawer( | |
child: const Text('In the Drawer', textAlign: TextAlign.center), | |
), | |
body: Text('Hello, World!', style: Theme.of(context).textTheme.headline4) | |
); | |
} | |
} | |
class Widget2 extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return Scaffold( | |
drawer: Drawer( | |
child: const Text('In the Drawer', textAlign: TextAlign.center), | |
), | |
body: Text('Hello, World!', style: Theme.of(context).textTheme.headline4) | |
); | |
} | |
} | |
class Widget3 extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return Scaffold( | |
drawer: Drawer( | |
child: const Text('In the Drawer', textAlign: TextAlign.center), | |
), | |
body: Text('Hello, World!', style: Theme.of(context).textTheme.headline4) | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment