copyWith method

TimeOfDay copyWith({
  1. int? hour,
  2. int? minute,
})
  • creates a new time of day with the same hour and minute,overridden by the parameters

Implementation

TimeOfDay copyWith({
  int? hour,
  int? minute,
}) =>
    TimeOfDay(
      hour: hour ?? this.hour,
      minute: minute ?? this.minute,
    );