class ChooseVisitTimeTitleState { int? currentSelectIndex; get currentSelectDayInfoItem => dayInfoList![currentSelectIndex!]; List? dayInfoList; ChooseVisitTimeTitleState({ this.currentSelectIndex = 0, dayInfoList, }): dayInfoList = dayInfoList ?? [ DayInfoItem(day: 'Tody', date: '2022-01-01', isSelected: true, isIntrady: true, holiday:false, enable: true), DayInfoItem(day: 'Tomorrow', date: '2022-01-02', isSelected: false, isIntrady: false,holiday:false, enable: true), DayInfoItem(day: 'Wendnesday', date: '2022-01-03', isSelected: false, isIntrady: false,holiday:false, enable: true), DayInfoItem(day: 'Thursdy', date: '2022-01-04', isSelected: false, isIntrady: false,holiday:false, enable: true), DayInfoItem(day: 'Friday', date: '2022-01-05', isSelected: false, isIntrady: false,holiday:false, enable: true), DayInfoItem(day: 'Saturday', date: '2022-01-06', isSelected: false, isIntrady: false,holiday:false, enable: true), DayInfoItem(day: 'Sunday', date: '2022-01-07', isSelected: false, isIntrady: false,holiday:false, enable: true), ]; ChooseVisitTimeTitleState copyWith({ int? currentSelectIndex, List? dayInfoList, }) { return ChooseVisitTimeTitleState( currentSelectIndex: currentSelectIndex ?? this.currentSelectIndex, dayInfoList: dayInfoList ?? this.dayInfoList, ); } } class DayInfoItem { int? id; String? day; String? date; bool isSelected; bool? isIntrady; bool? holiday; bool? enable; DayInfoItem({ this.id = 0, this.day, this.date, this.isSelected = false, this.isIntrady = false, this.holiday = false, this.enable = true, }); }