Reland changes to Intent.doNothing to avoid analyzer issue (#41477)
This re-lands #41417 with a slight change that will hopefully not tickle the analyzer as it did before. The last time I tried to land this, the analyzer succeeded for the analyze step in Cirrus, and locally, but failed in an integration test.
This commit is contained in:
@@ -235,9 +235,9 @@ abstract class UndoableAction extends Action {
|
||||
|
||||
@override
|
||||
@mustCallSuper
|
||||
void invoke(FocusNode node, Intent tag) {
|
||||
void invoke(FocusNode node, Intent intent) {
|
||||
invocationNode = node;
|
||||
invocationIntent = tag;
|
||||
invocationIntent = intent;
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -253,8 +253,8 @@ class SetFocusActionBase extends UndoableAction {
|
||||
FocusNode _previousFocus;
|
||||
|
||||
@override
|
||||
void invoke(FocusNode node, Intent tag) {
|
||||
super.invoke(node, tag);
|
||||
void invoke(FocusNode node, Intent intent) {
|
||||
super.invoke(node, intent);
|
||||
_previousFocus = WidgetsBinding.instance.focusManager.primaryFocus;
|
||||
node.requestFocus();
|
||||
}
|
||||
@@ -292,8 +292,8 @@ class SetFocusAction extends SetFocusActionBase {
|
||||
static const LocalKey key = ValueKey<Type>(SetFocusAction);
|
||||
|
||||
@override
|
||||
void invoke(FocusNode node, Intent tag) {
|
||||
super.invoke(node, tag);
|
||||
void invoke(FocusNode node, Intent intent) {
|
||||
super.invoke(node, intent);
|
||||
node.requestFocus();
|
||||
}
|
||||
}
|
||||
@@ -305,8 +305,8 @@ class NextFocusAction extends SetFocusActionBase {
|
||||
static const LocalKey key = ValueKey<Type>(NextFocusAction);
|
||||
|
||||
@override
|
||||
void invoke(FocusNode node, Intent tag) {
|
||||
super.invoke(node, tag);
|
||||
void invoke(FocusNode node, Intent intent) {
|
||||
super.invoke(node, intent);
|
||||
node.nextFocus();
|
||||
}
|
||||
}
|
||||
@@ -317,8 +317,8 @@ class PreviousFocusAction extends SetFocusActionBase {
|
||||
static const LocalKey key = ValueKey<Type>(PreviousFocusAction);
|
||||
|
||||
@override
|
||||
void invoke(FocusNode node, Intent tag) {
|
||||
super.invoke(node, tag);
|
||||
void invoke(FocusNode node, Intent intent) {
|
||||
super.invoke(node, intent);
|
||||
node.previousFocus();
|
||||
}
|
||||
}
|
||||
@@ -337,9 +337,9 @@ class DirectionalFocusAction extends SetFocusActionBase {
|
||||
TraversalDirection direction;
|
||||
|
||||
@override
|
||||
void invoke(FocusNode node, DirectionalFocusIntent tag) {
|
||||
super.invoke(node, tag);
|
||||
final DirectionalFocusIntent args = tag;
|
||||
void invoke(FocusNode node, DirectionalFocusIntent intent) {
|
||||
super.invoke(node, intent);
|
||||
final DirectionalFocusIntent args = intent;
|
||||
node.focusInDirection(args.direction);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user