state.dart 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. import 'package:get/get.dart';
  2. import '../../../../common/models/index.dart';
  3. class CreateCalendarEventState {
  4. // title
  5. final _title = "".obs;
  6. set title(value) => _title.value = value;
  7. get title => _title.value;
  8. // 是否更新
  9. final _isUpdate = false.obs;
  10. set isUpdate(bool value) => _isUpdate.value = value;
  11. bool get isUpdate => _isUpdate.value;
  12. // 选择日历
  13. Rx<CalendarInfo?> calendar = Rx<CalendarInfo?>(null);
  14. // 全天
  15. final _allDay = false.obs;
  16. set allDay(bool value) => _allDay.value = value;
  17. bool get allDay => _allDay.value;
  18. final _startDate = "".obs;
  19. set startDate(String value) => _startDate.value = value;
  20. String get startDate => _startDate.value;
  21. final _endDate = "".obs;
  22. set endDate(String value) => _endDate.value = value;
  23. String get endDate => _endDate.value;
  24. final _startTime = "".obs;
  25. set startTime(String value) => _startTime.value = value;
  26. String get startTime => _startTime.value;
  27. final _endTime = "".obs;
  28. set endTime(String value) => _endTime.value = value;
  29. String get endTime => _endTime.value;
  30. // 颜色
  31. final _eventColor = "".obs;
  32. set eventColor(String value) => _eventColor.value = value;
  33. String get eventColor => _eventColor.value;
  34. // repeat
  35. final _repeat = "NONE".obs;
  36. set repeat(String value) => _repeat.value = value;
  37. String get repeat => _repeat.value;
  38. // remind
  39. final _remind = "NONE".obs;
  40. set remind(String value) => _remind.value = value;
  41. String get remind => _remind.value;
  42. final _repeatEndDate = "".obs;
  43. set repeatEndDate(String value) => _repeatEndDate.value = value;
  44. String get repeatEndDate => _repeatEndDate.value;
  45. final RxList<String> weekDayKeys = <String>[].obs;
  46. }