update: cleanup and refactoring

This commit is contained in:
Nishant Srivastava
2018-01-19 04:07:07 +05:30
parent f257e0898d
commit ee49612fca
6 changed files with 8 additions and 16 deletions

View File

@ -1,15 +1,14 @@
import 'package:flutter/material.dart';
import './AboutPage.dart';
import './HomePage.dart';
import 'package:handling_routes/screens/about.dart';
import 'package:handling_routes/screens/home.dart';
void main() {
runApp(new MaterialApp(
home: new HomePage(),
home: new HomePage(), // home has implicit route set at '/'
// Setup routes
routes: <String, WidgetBuilder>{
// Set named routes
"/about": (BuildContext context) => new AboutPage(),
AboutPage.routeName: (BuildContext context) => new AboutPage(),
},
));
}