diff --git a/packages/flutter/lib/src/widgets/router.dart b/packages/flutter/lib/src/widgets/router.dart index c1c2e4eb53..e8ee2cf296 100644 --- a/packages/flutter/lib/src/widgets/router.dart +++ b/packages/flutter/lib/src/widgets/router.dart @@ -1326,7 +1326,7 @@ abstract class RouteInformationProvider extends ValueListenable[ isMethodCall('selectMultiEntryHistory', arguments: null), isMethodCall('routeInformationUpdated', arguments: { 'location': 'a', 'state': true, 'replace': false }), ]); log.clear(); - provider.routerReportsNewRouteInformation(const RouteInformation(location: 'a', state: false), type: RouteInformationReportingType.none); + provider.routerReportsNewRouteInformation(const RouteInformation(location: 'a', state: false)); // Since the location is the same, the provider sends replaces message. expect(log, [ isMethodCall('selectMultiEntryHistory', arguments: null), @@ -1392,7 +1392,7 @@ class SimpleRouteInformationProvider extends RouteInformationProvider with Chang } @override - void routerReportsNewRouteInformation(RouteInformation routeInformation, {required RouteInformationReportingType type}) { + void routerReportsNewRouteInformation(RouteInformation routeInformation, {RouteInformationReportingType type = RouteInformationReportingType.none}) { _value = routeInformation; onRouterReport?.call(routeInformation, type); }