Workaround for exhaustivness bug in dart2js (#123242)
Workaround for exhaustiveness bug in dart2js
This commit is contained in:
parent
fda9ecfef7
commit
f68a676353
@ -444,6 +444,9 @@ abstract class FocusTraversalPolicy with Diagnosticable {
|
|||||||
case TraversalEdgeBehavior.closedLoop:
|
case TraversalEdgeBehavior.closedLoop:
|
||||||
_focusAndEnsureVisible(sortedNodes.first, alignmentPolicy: ScrollPositionAlignmentPolicy.keepVisibleAtEnd);
|
_focusAndEnsureVisible(sortedNodes.first, alignmentPolicy: ScrollPositionAlignmentPolicy.keepVisibleAtEnd);
|
||||||
return true;
|
return true;
|
||||||
|
// TODO(goderbauer): Remove this hack once exhaustiveness bug is fixed, https://github.com/flutter/flutter/issues/123243.
|
||||||
|
default: // ignore: no_default_cases
|
||||||
|
throw UnsupportedError('unreachable');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!forward && focusedChild == sortedNodes.first) {
|
if (!forward && focusedChild == sortedNodes.first) {
|
||||||
@ -454,6 +457,9 @@ abstract class FocusTraversalPolicy with Diagnosticable {
|
|||||||
case TraversalEdgeBehavior.closedLoop:
|
case TraversalEdgeBehavior.closedLoop:
|
||||||
_focusAndEnsureVisible(sortedNodes.last, alignmentPolicy: ScrollPositionAlignmentPolicy.keepVisibleAtStart);
|
_focusAndEnsureVisible(sortedNodes.last, alignmentPolicy: ScrollPositionAlignmentPolicy.keepVisibleAtStart);
|
||||||
return true;
|
return true;
|
||||||
|
// TODO(goderbauer): Remove this hack once exhaustiveness bug is fixed, https://github.com/flutter/flutter/issues/123243.
|
||||||
|
default: // ignore: no_default_cases
|
||||||
|
throw UnsupportedError('unreachable');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user