Forráskód Böngészése

修改了一些命名

gavin.chen 2 éve
szülő
commit
372006cbb2

+ 1 - 1
lib/calendar_page/month_calendar/month_calendar_item.dart

@@ -160,7 +160,7 @@ class _MyWidgetState extends State<MonthDayItem> {
             );
           },
           onTapShowSchedule: (value) {
-            popupLayerController.handlePopupSchedule(
+            popupLayerController.handlePopupScheduleDetail(
               value,
               widget.dayData,
             );

+ 11 - 9
lib/popup_layer/popup_layer.dart

@@ -20,13 +20,14 @@ class _PopupLayerState extends State<PopupLayer> {
   bool _isShowSchedulePopup = false;
   bool _isNeedCloseSchedulePopup = false;
   GlobalKey moreSchedulePopupKey = GlobalKey();
-  GlobalKey schedulePopupKey = GlobalKey();
+  GlobalKey scheduleDetailPopupKey = GlobalKey();
   @override
   void initState() {
     super.initState();
     popupLayerController.onPopupMoreSchedule.addListener(_onPopupMoreSchedule);
     popupLayerController.onGlobalClick.addListener(_onGlobalClick);
-    popupLayerController.onPopupSchedule.addListener(_onPopupSchedule);
+    popupLayerController.onPopupScheduleDatail
+        .addListener(_onPopupScheduleDatail);
   }
 
   @override
@@ -35,7 +36,8 @@ class _PopupLayerState extends State<PopupLayer> {
     popupLayerController.onPopupMoreSchedule
         .removeListener(_onPopupMoreSchedule);
     popupLayerController.onGlobalClick.removeListener(_onGlobalClick);
-    popupLayerController.onPopupSchedule.removeListener(_onPopupSchedule);
+    popupLayerController.onPopupScheduleDatail
+        .removeListener(_onPopupScheduleDatail);
   }
 
   /// 收到显示更多日程的事件
@@ -46,11 +48,11 @@ class _PopupLayerState extends State<PopupLayer> {
     });
   }
 
-  /// 收到显示日程的事件
-  void _onPopupSchedule(e, GlobalKey key) {
+  /// 收到显示日程详情的事件
+  void _onPopupScheduleDatail(e, GlobalKey key) {
     setState(() {
       _isShowSchedulePopup = true;
-      schedulePopupKey = key;
+      scheduleDetailPopupKey = key;
     });
   }
 
@@ -97,7 +99,7 @@ class _PopupLayerState extends State<PopupLayer> {
                 _isNeedCloseSchedulePopup = false;
               });
             },
-            child: _buildSchedulePopup(schedulePopupKey),
+            child: _buildScheduleDetailPopup(scheduleDetailPopupKey),
           )
       ],
     );
@@ -128,7 +130,7 @@ class _PopupLayerState extends State<PopupLayer> {
           child: MoreSchedulePopup(
             scheduleData: popupLayerController.currMoreScheduleData,
             onTapShowSchedule: (value) {
-              popupLayerController.handlePopupSchedule(
+              popupLayerController.handlePopupScheduleDetail(
                 value,
                 popupLayerController.currMoreScheduleData,
               );
@@ -141,7 +143,7 @@ class _PopupLayerState extends State<PopupLayer> {
 
   /// 只做容器而无需负责内容
   /// [trigger] 触发器的 key
-  Widget _buildSchedulePopup(GlobalKey trigger) {
+  Widget _buildScheduleDetailPopup(GlobalKey trigger) {
     final Size triggerSize = getWidgetSize(trigger);
     final Offset triggerOffset = getWidgetOffset(trigger);
     return Flow(

+ 3 - 3
lib/popup_layer/popup_layer_controller.dart

@@ -10,7 +10,7 @@ class PopupLayerController extends GetxController {
   FEventHandler<GlobalKey> onPopupMoreSchedule = FEventHandler<GlobalKey>();
 
   /// 弹出层【显示日程详情】事件通知
-  FEventHandler<GlobalKey> onPopupSchedule = FEventHandler<GlobalKey>();
+  FEventHandler<GlobalKey> onPopupScheduleDatail = FEventHandler<GlobalKey>();
 
   /// 全局点击事件通知
   FEventHandler<PointerEvent> onGlobalClick = FEventHandler<PointerEvent>();
@@ -31,10 +31,10 @@ class PopupLayerController extends GetxController {
     onPopupMoreSchedule.emit(this, key);
   }
 
-  void handlePopupSchedule(
+  void handlePopupScheduleDetail(
       GlobalKey key, MonthViewDayStructure moreScheduleData) {
     currMoreScheduleData = moreScheduleData;
-    onPopupSchedule.emit(this, key);
+    onPopupScheduleDatail.emit(this, key);
   }
 
   @override