custom_route 0.1.1 custom_route: ^0.1.1 copied to clipboard
A package for routing th app.
import 'package:custom_route/custom_route.dart';
import 'package:example/setup_routing.dart';
import 'package:flutter/material.dart';
import 'screens/statefull/screen_1.dart';
void main() {
setUpRouting();
runApp(MyApp());
}
class MyApp extends StatelessWidget {
// This widget is the root of your application.
@override
Widget build(BuildContext context) {
return MaterialApp(
onGenerateRoute: CustomRoute.onGenerateRoute,
initialRoute: CustomRoute.initialRoute,
navigatorKey: CustomRoute.navigatorKey,
title: 'Flutter Demo',
///The default screen for the route "/" must be here
home: Screen1(),
);
}
}