custom_route 0.1.2
custom_route: ^0.1.2 copied to clipboard

A package for routing th app.

example/lib/main.dart

import 'package:custom_route/router.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: Router.onGenerateRoute,
      initialRoute: Router.initialRoute,
      navigatorKey: Router.navigatorKey,
      title: 'Flutter Demo',

      ///The default screen for the route "/" must be here
      home: Screen1(),
    );
  }
}