Remove deprecated SystemNavigator.routeUpdated method (#119187)

* Remove deprected SystemNavigator.routeUpdated

* test fix
This commit is contained in:
Michael Goderbauer
2023-02-01 14:36:11 -08:00
committed by GitHub
parent 578edfc856
commit 8fd5d4ebb1
2 changed files with 0 additions and 28 deletions

View File

@@ -98,28 +98,4 @@ class SystemNavigator {
},
);
}
/// Notifies the platform of a route change, and selects single-entry history
/// mode.
///
/// This is equivalent to calling [selectSingleEntryHistory] and
/// [routeInformationUpdated] together.
///
/// The `previousRouteName` argument is ignored.
@Deprecated(
'Use routeInformationUpdated instead. '
'This feature was deprecated after v2.3.0-1.0.pre.'
)
static Future<void> routeUpdated({
String? routeName,
String? previousRouteName,
}) {
return SystemChannels.navigation.invokeMethod<void>(
'routeUpdated',
<String, dynamic>{
'previousRouteName': previousRouteName,
'routeName': routeName,
},
);
}
}

View File

@@ -56,10 +56,6 @@ void main() {
isMethodCall('routeInformationUpdated', arguments: <String, dynamic>{ 'location': 'a', 'state': true, 'replace': true }),
]);
await verify(() => SystemNavigator.routeUpdated(routeName: 'a', previousRouteName: 'b'), <Object>[
isMethodCall('routeUpdated', arguments: <String, dynamic>{ 'routeName': 'a', 'previousRouteName': 'b' }),
]);
TestDefaultBinaryMessengerBinding.instance!.defaultBinaryMessenger.setMockMethodCallHandler(SystemChannels.navigation, null);
});
}