navigation_history_observer 1.0.3
navigation_history_observer: ^1.0.3 copied to clipboard
A Flutter NavigatorObserver that stores a collection of pushed routes history, as well as the popped history.
example/lib/main.dart
import 'package:example/example_page.dart';
import 'package:flutter/material.dart';
import 'package:navigation_history_observer/navigation_history_observer.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
// This widget is the root of your application.
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
theme: ThemeData(
primarySwatch: Colors.blue,
visualDensity: VisualDensity.adaptivePlatformDensity,
),
home: ExamplePage(pageNum: 1,),
navigatorObservers: [NavigationHistoryObserver()],
);
}
}