将光标更改为TableCalendar中的Pointer,以获取flutter Web

h22fl7wq  于 2022-11-17  发布在  Flutter
关注(0)|答案(1)|浏览(105)

我在flutter web应用程序中使用了table_calendar: ^3.0.8作为日历。但是当我们点击日期而不是指针时,它会显示光标。

是否可以将光标更改为指针?
表日历代码

TableCalendar(

                                          eventLoader: (day) {
                                            return   controller.getEventsListResponse2.value.data!.rows!.where((event) => isSameDay(DateTime.parse(event.eventStartDateTime.toString()),day)).toList();
                                          },

                                        onDaySelected: (date,events,) {

                                          setState(() {
                                            _selectedDay = date;
                                            _focusedDay = events;
                                          });

                                          controller.eventDetails.value =
                                              controller.getEventsListResponse2.value.data!.rows!
                                                  .where((event) =>
                                                  isSameDay(DateTime.parse(event.eventStartDateTime.toString()),events)).toList();
                            

                                          selectedDayPredicate: (day) =>
                                              isSameDay(_selectedDay, day),
                                          headerStyle: HeaderStyle(
                                            headerPadding: EdgeInsets.only(bottom: 20,left: 16),
                                              leftChevronVisible:false,
                                              rightChevronVisible: false,
                                              titleCentered: false,
                                              formatButtonVisible: false,
                                           

                                          ),
                                calendarStyle: CalendarStyle(
                                

                                 
                                
                                selectedDecoration: BoxDecoration(

                                    //color: Colors.white,
                                      border: Border.all(
                                          color:  AppColors.primaryColor,
                                        width: 2
                                      ),
                                      //color:Color(0xff513E81),
                                      shape: BoxShape.rectangle),
                                ),

                                          firstDay: DateTime(2020, 1), lastDay: DateTime(2030, 12), focusedDay: _focusedDay

,中)
在正常情况下,我用MOuseRegion Package 手势检测器,但这里没有手势检测器。

pjngdqdw

pjngdqdw1#

问题已解决。我已使用MouseRegion Package TableCalendar。

MouseRegion(
            cursor: SystemMouseCursors.click,
             child: TableCalendar()
)

相关问题