Skip to content

Instantly share code, notes, and snippets.

@bradcypert
Created August 11, 2020 19:56
Show Gist options
  • Save bradcypert/24689b2afaa80279e86fc7e5c17b5fff to your computer and use it in GitHub Desktop.
Save bradcypert/24689b2afaa80279e86fc7e5c17b5fff to your computer and use it in GitHub Desktop.
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