소스 검색

Merge branch 'master' of http://git.ius.plus/gavin.chen/calendar_view_demo

gavin.chen 2 년 전
부모
커밋
98d021ff9b
1개의 변경된 파일19개의 추가작업 그리고 11개의 파일을 삭제
  1. 19 11
      lib/calendar_page/month_calendar/schedule_popup.dart

+ 19 - 11
lib/calendar_page/month_calendar/schedule_popup.dart

@@ -1,4 +1,5 @@
 import 'package:calendar_view/calendar_controller/controller.dart';
+import 'package:calendar_view/popup_layer/popup_layer_controller.dart';
 import 'package:calendar_view/utils/calendar_util.dart';
 import 'package:flutter/material.dart';
 import 'package:get/get.dart';
@@ -18,6 +19,7 @@ class SchedulePopup extends StatefulWidget {
 
 class SchedulePopupState extends State<SchedulePopup> {
   CalendarController calendarController = Get.find<CalendarController>();
+  PopupLayerController popupLayerController = Get.find<PopupLayerController>();
   @override
   void initState() {
     super.initState();
@@ -30,14 +32,16 @@ class SchedulePopupState extends State<SchedulePopup> {
 
   @override
   Widget build(BuildContext context) {
-    return ListView(
-      shrinkWrap: true,
-      children: [
-        Container(
-          padding: const EdgeInsets.all(10),
-          child: _buildScheduleList(),
-        ),
-      ],
+    return Material(
+      child: ListView(
+        shrinkWrap: true,
+        children: [
+          Container(
+            padding: const EdgeInsets.all(10),
+            child: _buildScheduleList(),
+          ),
+        ],
+      ),
     );
   }
 
@@ -59,7 +63,7 @@ class SchedulePopupState extends State<SchedulePopup> {
     required IconData icon,
   }) {
     return IconButton(
-      onPressed: () => onPressed,
+      onPressed: () => onPressed(),
       icon: _buildIcon(
         icon: icon,
         size: 20,
@@ -164,7 +168,9 @@ class SchedulePopupState extends State<SchedulePopup> {
         mainAxisAlignment: MainAxisAlignment.end,
         children: [
           _buildIconButton(
-            onPressed: () {},
+            onPressed: () {
+              print('ddddd');
+            },
             icon: Icons.delete_outlined,
           ),
           _buildIconButton(
@@ -172,7 +178,9 @@ class SchedulePopupState extends State<SchedulePopup> {
             icon: Icons.launch_rounded,
           ),
           _buildIconButton(
-            onPressed: () {},
+            onPressed: () {
+              popupLayerController.onCloseSchedulePopup.emit(this, false);
+            },
             icon: Icons.close,
           ),
         ],