Skip to content

Commit 8fd5d4e

Browse files
authored
Remove deprecated SystemNavigator.routeUpdated method (#119187)
* Remove deprected SystemNavigator.routeUpdated * test fix
1 parent 578edfc commit 8fd5d4e

File tree

2 files changed

+0
-28
lines changed

2 files changed

+0
-28
lines changed

packages/flutter/lib/src/services/system_navigator.dart

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -98,28 +98,4 @@ class SystemNavigator {
9898
},
9999
);
100100
}
101-
102-
/// Notifies the platform of a route change, and selects single-entry history
103-
/// mode.
104-
///
105-
/// This is equivalent to calling [selectSingleEntryHistory] and
106-
/// [routeInformationUpdated] together.
107-
///
108-
/// The `previousRouteName` argument is ignored.
109-
@Deprecated(
110-
'Use routeInformationUpdated instead. '
111-
'This feature was deprecated after v2.3.0-1.0.pre.'
112-
)
113-
static Future<void> routeUpdated({
114-
String? routeName,
115-
String? previousRouteName,
116-
}) {
117-
return SystemChannels.navigation.invokeMethod<void>(
118-
'routeUpdated',
119-
<String, dynamic>{
120-
'previousRouteName': previousRouteName,
121-
'routeName': routeName,
122-
},
123-
);
124-
}
125101
}

packages/flutter/test/services/system_navigator_test.dart

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,6 @@ void main() {
5656
isMethodCall('routeInformationUpdated', arguments: <String, dynamic>{ 'location': 'a', 'state': true, 'replace': true }),
5757
]);
5858

59-
await verify(() => SystemNavigator.routeUpdated(routeName: 'a', previousRouteName: 'b'), <Object>[
60-
isMethodCall('routeUpdated', arguments: <String, dynamic>{ 'routeName': 'a', 'previousRouteName': 'b' }),
61-
]);
62-
6359
TestDefaultBinaryMessengerBinding.instance!.defaultBinaryMessenger.setMockMethodCallHandler(SystemChannels.navigation, null);
6460
});
6561
}

0 commit comments

Comments
 (0)