copyWith method

AdTextView copyWith(
  1. AdView? view
)
override

Copy this with a new AdView

Implementation

AdTextView copyWith(AdView? view) {
  if (view == null) return this;
  assert(view is AdTextView);
  return AdTextView(
    decoration: view.decoration ?? decoration,
    height: view.height ?? height,
    width: view.width ?? width,
    margin: view.margin ?? margin,
    padding: view.padding ?? padding,
    elevation: view.elevation ?? elevation,
    elevationColor: view.elevationColor ?? elevationColor,
    maxLines: (view as AdTextView).maxLines ?? maxLines,
    minLines: view.minLines ?? minLines,
    style: _copyStylesWithin(this.style, view.style),
    text: view.text ?? text,
  );
}