mirror of
https://github.com/nisrulz/flutter-examples.git
synced 2025-06-18 22:03:38 +08:00
15 lines
418 B
Dart
15 lines
418 B
Dart
import 'package:flutter/material.dart';
|
|
import 'package:handling_routes/screens/about.dart';
|
|
import 'package:handling_routes/screens/home.dart';
|
|
|
|
void main() {
|
|
runApp(new MaterialApp(
|
|
home: new HomePage(), // home has implicit route set at '/'
|
|
// Setup routes
|
|
routes: <String, WidgetBuilder>{
|
|
// Set named routes
|
|
AboutPage.routeName: (BuildContext context) => new AboutPage(),
|
|
},
|
|
));
|
|
}
|