backgroundClip property

  1. @override
CSSBackgroundBoundary? get backgroundClip
override

Background-clip

Implementation

@override
CSSBackgroundBoundary? get backgroundClip => _backgroundClip;
set backgroundClip (CSSBackgroundBoundary? value)

Implementation

set backgroundClip(CSSBackgroundBoundary? value) {
  if (value == _backgroundClip) return;
  final CSSBackgroundBoundary? oldValue = _backgroundClip;
  _backgroundClip = value;
  // `background-clip:text` affects how glyphs are built/painted (paragraph cache),
  // so toggling to/from it must rebuild text layout instead of paint-only.
  final bool togglesClipText =
      oldValue == CSSBackgroundBoundary.text || value == CSSBackgroundBoundary.text;
  if (togglesClipText) {
    markNeedsLayout();
  } else {
    markNeedsPaint();
  }
  resetBoxDecoration();
}