handle
library
Functions
-
defaultBuildDayItem<T>(BuildContext context, DateDay dayTime, {bool enableSelect = false, bool hasMark = false, double height = 30, double width = 30, T? markData, Color weekColor = const Color(0xa6000000), Color weekendColor = const Color(0xffFF4081), bool isSelected = false, bool isContinuous = false, bool isMultiple = false, bool first = true, bool end = true, BuildMark<T>? buildMark, OnDaySelected<T>? onDaySelected, CalendarLocaleType localeType = CalendarLocaleType.zh})
→ Widget
-
默认构建日视图
context
- 上下文
height
- 控件高
width
- 控件宽
dayTime
- 当前日期
enableSelect
- 是否可选
hasMark
- 是否含有标记
markData
- 标记内容
weekColor
- 工作日颜色
weekendColor
- 周末颜色
isSelected
- 是否被单选
isContinuous
- 是否被连选
isMultiple
- 是否被多选
buildMark
- 自定义构建mark
onDaySelected
- 选择事件
-
defaultBuildMark<T>({BuildContext? context, DateDay? day, T? data})
→ Widget
-
默认构建标记
-
defaultBuildMonthBackground(BuildContext context, DateMonth month)
→ Widget
-
默认构建月视图背景
-
defaultBuildMonthHead(BuildContext context, DateMonth month, {VoidCallback? onLast, VoidCallback? onNext, VoidCallback? onClear})
→ Widget
-
默认构建月视图头部
-
defaultBuildWeekHead(BuildContext context, int week, {CalendarLocaleType localeType = CalendarLocaleType.zh})
→ Widget
-
默认构建星期标题
-
defaultBuildYearHead(BuildContext context, int year, {VoidCallback? onLast, VoidCallback? onNext})
→ Widget
-
默认构建年视图头部
Typedefs
-
BuildMark<T>
= Widget Function(BuildContext context, DateDay day, T? data)
-
构建Mark
context
- 上下文
day
- 所在日期
data
- 若存在mark则返回mark的内容
-
BuildWeekHead
= Widget Function(BuildContext context, int week)
-
构建星期头
context
- 上下文
week
- 星期数字: 0-周日,1-周一,2-周二,3-周三,4-周四,5-周五,6-周六
-
BuildWithDay<T>
= Widget Function(BuildContext context, DateDay dayTime, {BuildMark<T>? buildMark, bool enableSelect, bool hasMark, double height, bool isContinuous, bool isMultiple, bool isSelected, T? markData, OnDaySelected<T> onDaySelected, Color weekColor, Color weekendColor, double width})
-
默认构建日视图
context
- 上下文
height
- 控件高
width
- 控件宽
dayTime
- 当前日期
enableSelect
- 是否可选
hasMark
- 是否含有标记
markData
- 标记内容
weekColor
- 工作日颜色
weekendColor
- 周末颜色
isSelected
- 是否被单选
isContinuous
- 是否被连选
isMultiple
- 是否被多选
buildMark
- 自定义构建mark
onDaySelected
- 选择事件
-
BuildWithMonth
= Widget Function(BuildContext context, double width, double height, DateMonth month)
-
构建月相关控件
context
- 上下文
month
- 所在月份
-
BuildWithYear
= Widget Function(BuildContext context, double width, double height, int year)
-
构建年相关控件
context
- 上下文
month
- 所在月份
-
OnContinuousSelectListen
= void Function(DateDay? firstDay, DateDay? secondDay)
-
连选回调
firstDay
-开始日期
secondDay
-结束时间
-
OnDaySelected<T>
= void Function(DateDay day, T? markData, bool enable)
-
当日期被选中时回调
day
- 选中的日期
markData
- 若存在mark则返回mark的内容
enable
- 是否是可选日期