offset property Null safety

ViewportOffset offset

The offset at which the text should be painted.

If the text content is larger than the editable line itself, the editable line clips the text. This property controls which part of the text is visible by shifting the text by the given offset before clipping.

Implementation

ViewportOffset get offset => _offset;
void offset=(ViewportOffset value)

Implementation

set offset(ViewportOffset value) {
  assert(value != null);
  if (_offset == value) {
    return;
  }
  if (attached) {
    _offset.removeListener(markNeedsPaint);
  }
  _offset = value;
  if (attached) {
    _offset.addListener(markNeedsPaint);
  }
  markNeedsLayout();
}