inlinePlaceholderBoxes property

List<TextBox>? get inlinePlaceholderBoxes

An ordered list of TextBoxes that bound the positions of the placeholders in the paragraph.

Each box corresponds to a PlaceholderSpan in the order they were defined in the InlineSpan tree.

Implementation

List<TextBox>? get inlinePlaceholderBoxes {
  final _TextPainterLayoutCacheWithOffset? layout = _layoutCache;
  if (layout == null) {
    return null;
  }
  final Offset offset = layout.paintOffset;
  if (!offset.dx.isFinite || !offset.dy.isFinite) {
    return <TextBox>[];
  }
  final List<TextBox> rawBoxes = layout.inlinePlaceholderBoxes;
  if (offset == Offset.zero) {
    return rawBoxes;
  }
  return rawBoxes.map((TextBox box) => _shiftTextBox(box, offset)).toList(growable: false);
}