copyWith method

AdButtonView copyWith(
  1. AdView? view
)
override

Copy this with a new AdView

Implementation

AdButtonView copyWith(AdView? view) {
  if (view == null) return this;
  assert(view is AdButtonView);
  return AdButtonView(
    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 AdButtonView).maxLines ?? maxLines,
    minLines: view.minLines ?? minLines,
    textStyle: view.style ?? style,
    text: view.text ?? text,
    pressColor: view.pressColor ?? pressColor,
  );
}