|
@@ -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,
|
|
|
),
|
|
|
],
|