gpt4 book ai didi

flutter - 如何在 table_calendar 包 flutter 中获取当前显示的月份

转载 作者:行者123 更新时间:2023-12-05 03:55:38 27 4
gpt4 key购买 nike

我正在使用 table_calendar flutter 包构建日历。其他所有事情现在都完成了,我只想从日历中获取当前选择的月份。我试图找出方法并尝试所有事件但尚未成功。任何人都有解决方案,帮助我很多。

包链接:https://pub.dev/packages/table_calendar

最佳答案

查看https://pub.flutter-io.cn/documentation/table_calendar/latest/table_calendar/CalendarController-class.html

您应该能够通过在 CalendarController 上使用 focusedDay 来获取当前月份。

focusedDay → DateTime
Currently focused day (used to determine which year/month should be visible).
read-only

关于flutter - 如何在 table_calendar 包 flutter 中获取当前显示的月份,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60096928/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com