chooseVisitTimeTitle_state.dart 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. class ChooseVisitTimeTitleState {
  2. int? currentSelectIndex;
  3. List<DayInfoItem>? dayInfoList;
  4. ChooseVisitTimeTitleState({
  5. this.currentSelectIndex = 0,
  6. dayInfoList,
  7. }): dayInfoList = dayInfoList ?? [
  8. DayInfoItem(day: 'Tody', date: '2022-01-01', isSelected: true, isIntrady: true,),
  9. DayInfoItem(day: 'Tomorrow', date: '2022-01-02', isSelected: false, isIntrady: false,),
  10. DayInfoItem(day: 'Wendnesday', date: '2022-01-03', isSelected: false, isIntrady: false,),
  11. DayInfoItem(day: 'Thursdy', date: '2022-01-04', isSelected: false, isIntrady: false,),
  12. DayInfoItem(day: 'Friday', date: '2022-01-05', isSelected: false, isIntrady: false,),
  13. DayInfoItem(day: 'Saturday', date: '2022-01-06', isSelected: false, isIntrady: false,),
  14. DayInfoItem(day: 'Sunday', date: '2022-01-07', isSelected: false, isIntrady: false,),
  15. ];
  16. ChooseVisitTimeTitleState copyWith({
  17. int? currentSelectIndex,
  18. List<DayInfoItem>? dayInfoList,
  19. }) {
  20. return ChooseVisitTimeTitleState(
  21. currentSelectIndex: currentSelectIndex ?? this.currentSelectIndex,
  22. dayInfoList: dayInfoList ?? this.dayInfoList,
  23. );
  24. }
  25. }
  26. class DayInfoItem {
  27. int? id;
  28. String? day;
  29. String? date;
  30. bool isSelected;
  31. bool isIntrady;
  32. DayInfoItem({
  33. this.id = 0,
  34. this.day,
  35. this.date,
  36. this.isSelected = false,
  37. this.isIntrady = false,
  38. });
  39. }