Skip to content

Commit

Permalink
Remove deprecated SystemNavigator.routeUpdated method (#119187)
Browse files Browse the repository at this point in the history
* Remove deprected SystemNavigator.routeUpdated

* test fix
  • Loading branch information
goderbauer committed Feb 1, 2023
1 parent 578edfc commit 8fd5d4e
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 28 deletions.
24 changes: 0 additions & 24 deletions packages/flutter/lib/src/services/system_navigator.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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,
},
);
}
}
4 changes: 0 additions & 4 deletions packages/flutter/test/services/system_navigator_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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);
});
}

0 comments on commit 8fd5d4e

Please sign in to comment.