copyWith method

  1. @override
FormeCupertinoSlidingSegmentedControlModel<T> copyWith(
  1. FormeModel oldModel
)

Implementation

@override
FormeCupertinoSlidingSegmentedControlModel<T> copyWith(FormeModel oldModel) {
  FormeCupertinoSlidingSegmentedControlModel<T> old =
      oldModel as FormeCupertinoSlidingSegmentedControlModel<T>;
  return FormeCupertinoSlidingSegmentedControlModel<T>(
    thumbColor: thumbColor ?? old.thumbColor,
    backgroundColor: backgroundColor ?? old.backgroundColor,
    disableThumbColor: disableThumbColor ?? old.disableThumbColor,
    disableBackgroundColor:
        disableBackgroundColor ?? old.disableBackgroundColor,
    padding: padding ?? old.padding,
    children: children ?? old.children,
  );
}