【问题标题】:Flutter SfCalendar customize "dot"Flutter SfCalendar 自定义“圆点”
【发布时间】:2023-01-23 17:29:27
【问题描述】:

是否可以自定义 SfCalendar 小部件内的“点”(图片)?我想要一个图标而不是一个简单的彩色点。或者是否有其他包可以做到这一点? 代码:

 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(() {});
          });
        }
      },
    ));

这里的图片。

【问题讨论】:

    标签: flutter dart syncfusion


    【解决方案1】:

    您可以通过使用“月CellBuilder" 日历的属性。

    请参阅以下链接中的知识库文档,了解如何在 Flutter 日历中自定义带有约会计数的月份单元格:https://www.syncfusion.com/kb/12306/how-to-customize-the-month-cell-with-appointment-count-in-the-flutter-calendar

    想了解更多日历支持“monthCellBuilder”的细节,请参考UG文档,链接如下:https://help.syncfusion.com/flutter/calendar/builders#month-cell-builder

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2019-05-31
      • 2021-07-20
      • 1970-01-01
      • 2019-05-08
      • 2021-02-23
      • 1970-01-01
      • 2020-08-22
      相关资源
      最近更新 更多