Unverified Commit 40405706 authored by Kate Lovett's avatar Kate Lovett Committed by GitHub

Removed deprecated NavigatorState.focusScopeNode (#139260)

Part of https://github.com/flutter/flutter/issues/139243

Deprecated in https://github.com/flutter/flutter/pull/109702

The replacement for focusScopeNode is focusNode.enclosingScope
parent 12aa1987
......@@ -23,6 +23,17 @@
# * ListWheelScrollView: fix_list_wheel_scroll_view.yaml
version: 1
transforms:
# Changes made in TBD
- title: "Migrate to focusNode.enclosingScope!"
date: 2023-11-29
element:
uris: [ 'widgets.dart', 'material.dart', 'cupertino.dart' ]
getter: 'focusScopeNode'
inClass: 'NavigatorState'
changes:
- kind: 'rename'
newName: 'focusNode.enclosingScope!'
# Changes made in https://github.com/flutter/flutter/pull/138509
- title: "Migrate to 'PlatformMenuBar.child'"
date: 2023-11-15
......
......@@ -3505,13 +3505,6 @@ class NavigatorState extends State<Navigator> with TickerProviderStateMixin, Res
final Queue<_NavigatorObservation> _observedRouteAdditions = Queue<_NavigatorObservation>();
final Queue<_NavigatorObservation> _observedRouteDeletions = Queue<_NavigatorObservation>();
/// The [FocusScopeNode] for the [FocusScope] that encloses the topmost navigator.
@Deprecated(
'Use focusNode.enclosingScope! instead. '
'This feature was deprecated after v3.1.0-0.0.pre.'
)
FocusScopeNode get focusScopeNode => focusNode.enclosingScope!;
/// The [FocusNode] for the [Focus] that encloses the routes.
final FocusNode focusNode = FocusNode(debugLabel: 'Navigator');
......
......@@ -173,4 +173,8 @@ void main() {
final PlatformMenuBar platformMenuBar = PlatformMenuBar(menus: <PlatformMenuItem>[], body: const SizedBox());
final Widget bodyValue = platformMenuBar.body;
// Changes made in TBD
final NavigatorState state = Navigator.of(context);
state.focusScopeNode;
}
......@@ -173,4 +173,8 @@ void main() {
final PlatformMenuBar platformMenuBar = PlatformMenuBar(menus: <PlatformMenuItem>[], child: const SizedBox());
final Widget bodyValue = platformMenuBar.child;
// Changes made in TBD
final NavigatorState state = Navigator.of(context);
state.focusNode.enclosingScope!;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment