123456789101112131415161718192021222324252627282930313233343536 |
- import 'package:flutter/material.dart';
- import 'package:sport/application.dart';
- mixin InjectRouteAware<T extends StatefulWidget> on State<T> implements RouteAware {
- @override
- void didChangeDependencies() {
- super.didChangeDependencies();
- routeObserver.subscribe(this, ModalRoute.of(context));
- }
- @override
- void dispose() {
- routeObserver.unsubscribe(this);
- super.dispose();
- }
- @override
- void didPop() {
- print("666666666666666666666666");
- }
- @override
- void didPopNext() {
- print("7777777777777777777777");
- }
- @override
- void didPush() {
- print("88888888888888888888");
- }
- @override
- void didPushNext() {
- print("99999999999999999999");
- }
- }
|