defaultTraversalRequestFocusCallback static method
- FocusNode node, {
- ScrollPositionAlignmentPolicy? alignmentPolicy,
- double? alignment,
- Duration? duration,
- Curve? curve,
The default value for requestFocusCallback.
Requests focus from node
and ensures the node is visible
by calling Scrollable.ensureVisible.
Implementation
static void defaultTraversalRequestFocusCallback(
FocusNode node, {
ScrollPositionAlignmentPolicy? alignmentPolicy,
double? alignment,
Duration? duration,
Curve? curve,
}) {
node.requestFocus();
Scrollable.ensureVisible(
node.context!,
alignment: alignment ?? 1,
alignmentPolicy: alignmentPolicy ?? ScrollPositionAlignmentPolicy.explicit,
duration: duration ?? Duration.zero,
curve: curve ?? Curves.ease,
);
}