简体   繁体   English

Flutter SfCalendar 自定义“点”

[英]Flutter SfCalendar customize "dot"

Is it possible to Customize the "dot" (Picture) inside the SfCalendar widget?是否可以自定义 SfCalendar 小部件内的“点”(图片)? I want a Icon there instead of a simple colored dot.我想要一个图标而不是一个简单的彩色点。 Or is there a other package where this is possible?或者是否有其他 package 可以这样做? Code:代码:

 body: SfCalendar(
      view: CalendarView.month,
      initialSelectedDate: DateTime.now(),
      initialDisplayDate: DateTime.now(),
      dataSource: events,

      controller: _controller,
      onSelectionChanged: selectionChanged,
      monthViewSettings: const MonthViewSettings(
        showAgenda: true,
      ),
      onTap: (details) {
        if (details.targetElement == CalendarElement.appointment || details.targetElement == CalendarElement.agenda) {
          final Meeting appointmentDetails = details.appointments![0];
          databaseReference.collection('CalendarAppointmentCollection').doc(appointmentDetails.id).delete();
          getDataFromFireStore().then((results) {
            setState(() {});
          });
        }
      },
    ));

Here the picture.这里的图片。 在此处输入图像描述

You can achieve your requirement by customizing the calendar month cell with an appointment count by using the " monthCellBuilder " property of the calendar.您可以通过使用日历的“ monthCellBuilder ”属性自定义具有约会计数的日历月单元格来实现您的要求。

Refer to the KB document at the following link to learn how to customize the month cell with an appointment count in the Flutter calendar: https://www.syncfusion.com/kb/12306/how-to-customize-the-month-cell-with-appointment-count-in-the-flutter-calendar .请参阅以下链接中的知识库文档,了解如何使用 Flutter 日历中的约会计数自定义月份单元格: https://www.syncfusion.com/kb/12306/how-to-customize-the-month-颤振日历中的预约计数单元格

To know more details about "monthCellBuilder" support from the calendar, please refer to the UG document at the following link: https://help.syncfusion.com/flutter/calendar/builders#month-cell-builder想了解更多日历支持“monthCellBuilder”的细节,请参考UG文档,链接如下: https://help.syncfusion.com/flutter/calendar/builders#month-cell-builder

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM