[go: nahoru, domu]

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Intensive if chain refactoring #145194

Merged
Prev Previous commit
Next Next commit
fix variable order
  • Loading branch information
nate-thegrate committed Mar 15, 2024
commit 4cd3d5120cd6cb64e152b75aef36ac17637ed941
3 changes: 1 addition & 2 deletions packages/flutter/lib/src/material/menu_anchor.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2426,11 +2426,10 @@ class _MenuDirectionalFocusAction extends DirectionalFocusAction {
super.invoke(intent);
return;
}

final bool buttonIsFocused = anchor.widget.childFocusNode?.hasPrimaryFocus ?? false;
final Axis? parentOrientation = anchor._parent?._orientation;
final Axis orientation = (buttonIsFocused ? parentOrientation : null) ?? anchor._orientation;
final bool differentParent = orientation != parentOrientation;
final bool buttonIsFocused = anchor.widget.childFocusNode?.hasPrimaryFocus ?? false;
final bool firstItemIsFocused = anchor._firstItemFocusNode?.hasPrimaryFocus ?? false;
final bool rtl = switch (Directionality.of(context)) {
TextDirection.rtl => true,
Expand Down