popup_layer_controller.dart 979 B

1234567891011121314151617181920212223242526272829303132
  1. import 'package:calendar_view/utils/calendar_util.dart';
  2. import 'package:calendar_view/utils/event_type.dart';
  3. import 'package:flutter/material.dart';
  4. import 'package:get/get.dart';
  5. class PopupLayerController extends GetxController {
  6. PopupLayerController();
  7. /// 弹出层【显示更多日程】事件通知
  8. FEventHandler<GlobalKey> onPopupMoreSchedule = FEventHandler<GlobalKey>();
  9. /// 全局点击事件通知
  10. FEventHandler<PointerEvent> onGlobalClick = FEventHandler<PointerEvent>();
  11. /// Popup 弹出层相关的数据
  12. /// 当前需要显示更多的日程数据
  13. MonthViewDayStructure currMoreScheduleData = MonthViewDayStructure(
  14. index: 1,
  15. date: DateTime.now(),
  16. ); // 当前显示更多日程的下标
  17. void handlePopupMoreSchedule(
  18. GlobalKey key, MonthViewDayStructure moreScheduleData) {
  19. currMoreScheduleData = moreScheduleData;
  20. onPopupMoreSchedule.emit(this, key);
  21. }
  22. @override
  23. void onInit() {
  24. super.onInit();
  25. }
  26. }