Last active
June 26, 2019 12:03
-
-
Save marcel-ploch/5003be5eba6410a5eddfba9731088697 to your computer and use it in GitHub Desktop.
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 { | |
final materialApp = MaterialApp( | |
title: UIData.appName, | |
theme: ThemeData( | |
primaryColor: Colors.green, | |
fontFamily: UIData.quickFont, | |
primarySwatch: Colors.amber), | |
home: HomePage(), | |
initialRoute: null, | |
routes: <String, WidgetBuilder>{ | |
UIData.homeRoute: (BuildContext context) => HomePage(), | |
UIData.citiesRoute: (BuildContext context) => CitiesPage(), | |
UIData.twitter: (BuildContext context) => TwitterPage(), | |
UIData.teamRoute: (BuildContext context) => TeamsPage(), | |
UIData.planRoute: (BuildContext context) => PlanPage(), | |
UIData.quizRoute: (BuildContext context) => QuizPage(), | |
UIData.impressionRoute: (BuildContext context) => ImpressionPage(), | |
); | |
@override | |
Widget build(BuildContext context) { | |
return materialApp; | |
} | |
} | |
class UIData { | |
//routes | |
static const String homeRoute = "/home"; | |
static const String teamRoute = "/teams"; | |
static const String planRoute = "/plan"; | |
static const String citiesRoute = "/cities"; | |
static const String twitter = "/twitter"; | |
static const String quizRoute = "/quiz"; | |
static const String impressionRoute = "/impression"; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment