copyWith method

ModelDate copyWith({
  1. int? year,
  2. int? month,
  3. int? day,
})

Create a new ModelDate with the specified year, month, and day.

指定したyearmonthdayで新しいModelDateを作成します。

Implementation

ModelDate copyWith({int? year, int? month, int? day}) {
  return ModelDate.date(
    year ?? value.year,
    month ?? value.month,
    day ?? value.day,
  );
}