chooseVisitTimeTitle_state.dart 1.7 KB

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