简体   繁体   English

获取 jalali_table_calendar package flutter 的事件文本

[英]get event text of jalali_table_calendar package flutter

Please guide me how to get the text of the recorded events请指导我如何获取记录事件的文本

jalali_table_calendar jalali_table_calendar

You can save the event with the following command, but how can I get the recorded event by selecting the date?您可以使用以下命令保存事件,但是如何通过选择日期来获取记录的事件?

DateTime today = DateTime.now();
JalaliCalendar(
    context: context,
    // add the events for each day
    events: {
        DateTime(2021,4,15):['sample event',66546],
        today: ['sample event'],
        today.add(Duration(days: 1)): [6, 5, 465, 1, 66546],
        today.add(Duration(days: 2)): [6, 5, 465, 66546],
         },
    //make marker for every day that have some events
    marker: (date,events){
        return Positioned(
            top: -4,
            left: 0,
            child: Container(
            decoration: BoxDecoration(
            color: Theme.of(context).textSelectionColor,
            shape: BoxShape.circle),
            padding: const EdgeInsets.all(6.0),
              child: Text(events.length.toString()),
                ),
             );
            },
    onDaySelected: (date) {
        print(date);
         }),

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

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