|
@@ -8,18 +8,20 @@ class SchedulePopup extends StatefulWidget {
|
|
|
const SchedulePopup({
|
|
|
Key? key,
|
|
|
required this.scheduleData,
|
|
|
+ required this.onClose,
|
|
|
}) : super(key: key);
|
|
|
|
|
|
/// 日程数据
|
|
|
final Schedule scheduleData;
|
|
|
|
|
|
+ final VoidCallback onClose;
|
|
|
+
|
|
|
@override
|
|
|
SchedulePopupState createState() => SchedulePopupState();
|
|
|
}
|
|
|
|
|
|
class SchedulePopupState extends State<SchedulePopup> {
|
|
|
CalendarController calendarController = Get.find<CalendarController>();
|
|
|
- PopupLayerController popupLayerController = Get.find<PopupLayerController>();
|
|
|
@override
|
|
|
void initState() {
|
|
|
super.initState();
|
|
@@ -63,7 +65,8 @@ class SchedulePopupState extends State<SchedulePopup> {
|
|
|
required IconData icon,
|
|
|
}) {
|
|
|
return IconButton(
|
|
|
- onPressed: () => onPressed(),
|
|
|
+ splashRadius: 20,
|
|
|
+ onPressed: onPressed,
|
|
|
icon: _buildIcon(
|
|
|
icon: icon,
|
|
|
size: 20,
|
|
@@ -179,7 +182,7 @@ class SchedulePopupState extends State<SchedulePopup> {
|
|
|
),
|
|
|
_buildIconButton(
|
|
|
onPressed: () {
|
|
|
- popupLayerController.onCloseSchedulePopup.emit(this, false);
|
|
|
+ widget.onClose.call();
|
|
|
},
|
|
|
icon: Icons.close,
|
|
|
),
|