-
-
Save shivanchalaeologic/24ed18f08f0f14fffbcfaedbd432ef97 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
void main() { | |
runApp(MyApp()); | |
} | |
final RouteObserver<PageRoute> routeObserver = RouteObserver<PageRoute>(); | |
class MyApp extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return MaterialApp( | |
navigatorObservers: [MyRouteObserver()], | |
routes: { | |
'pageone': (context) => PageOne(), | |
'pagetwo': (context) => PageTwo() | |
}, | |
theme: ThemeData( | |
primarySwatch: Colors.blue, | |
visualDensity: VisualDensity.adaptivePlatformDensity, | |
), | |
home: MyHomePage(title: 'Flutter Demo Home Page'), | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment