router_delegate17 1.0.0
router_delegate17: ^1.0.0 copied to clipboard
A subclass of routerDelegate. With router ,not only provide an easy way to navigate,but also provide page status. Not applicable for web.
import 'package:example/app.dart';
import 'package:flutter/material.dart';
void main() async {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'flutter RouteDelegate17 demo',
theme: ThemeData(
primarySwatch: Colors.blue,
),
home: Router(
routerDelegate: routerDelegate,
backButtonDispatcher: RootBackButtonDispatcher()),
);
}
}