ensureVisible method
Future<void>
ensureVisible(
- TextSpan span, {
- double alignment = 0.0,
- Duration duration = Duration.zero,
- Curve curve = Curves.ease,
- ScrollPositionAlignmentPolicy alignmentPolicy = ScrollPositionAlignmentPolicy.explicit,
- double offset = 0,
- int spanIndex = 0,
- int textBoxIndex = 0,
- bool spanSelector()?,
- bool textBoxSelector()?,
- double offsetSelector()?,
Implementation
Future<void> ensureVisible(
TextSpan span, {
double alignment = 0.0,
Duration duration = Duration.zero,
Curve curve = Curves.ease,
ScrollPositionAlignmentPolicy alignmentPolicy =
ScrollPositionAlignmentPolicy.explicit,
double offset = 0,
int spanIndex = 0,
int textBoxIndex = 0,
bool Function(List<TextBox> spanBoxes, int index, int length)? spanSelector,
bool Function(TextBox textBox, int index, int length)? textBoxSelector,
double Function(TextBox textBox, double alignment)? offsetSelector,
}) {
return _richTextPositionerKey.currentState!.ensureVisible(
span,
alignment: alignment,
alignmentPolicy: alignmentPolicy,
curve: curve,
duration: duration,
offset: offset,
offsetSelector: offsetSelector,
spanIndex: spanIndex,
spanSelector: spanSelector,
textBoxIndex: textBoxIndex,
textBoxSelector: textBoxSelector,
);
}