apply property

set apply (NikuSelectableText? v)
override

Implementation

set apply(NikuSelectableText? v) {
  if (v == null) return;

  if (style == null && v.style != null) style = NikuTextStyle();
  if (strutStyle == null && v.strutStyle != null)
    strutStyle = NikuStrutStyle();

  style?.apply = v.style;
  strutStyle?.apply = v.strutStyle;
  textAlign = v.textAlign ?? textAlign;
  textDirection = v.textDirection ?? textDirection;
  textScaleFactor = v.textScaleFactor ?? textScaleFactor;
  autofocus = v.autofocus ?? autofocus;
  minLines = v.minLines ?? minLines;
  maxLines = v.maxLines ?? maxLines;
  showCursor = showCursor ?? showCursor;
  cursorWidth = cursorWidth ?? cursorWidth;
  cursorHeight = cursorHeight ?? cursorHeight;
  cursorRadius = cursorRadius ?? cursorRadius;
  cursorColor = cursorColor ?? cursorColor;
  selectionHeightStyle = selectionHeightStyle ?? selectionHeightStyle;
  selectionWidthStyle = selectionWidthStyle ?? selectionWidthStyle;
  enableInteractiveSelection =
      enableInteractiveSelection ?? enableInteractiveSelection;
  selectionControls = selectionControls ?? selectionControls;
  dragStartBehavior = dragStartBehavior ?? dragStartBehavior;
  toolbarOptions = toolbarOptions ?? toolbarOptions;
  onTap = onTap ?? onTap;
  scrollPhysics = scrollPhysics ?? scrollPhysics;
  textWidthBasis = v.textWidthBasis ?? textWidthBasis;
  textHeightBehavior = v.textHeightBehavior ?? textHeightBehavior;
  textHeightBehavior = v.textHeightBehavior ?? textHeightBehavior;

  $parent..$merge(v.$parent);
}