DayClipDelegate class abstract

可扩展日历设置。

// 创建自定义日历页
class CalendarPage extends StatelessWidget with ExCalendar {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text("日历"),
      ),
      body: CalendarWidget(
        extra: this,
      ),
    );
  }
}

// 自定义扩展
class ExCalendar implements DayClipDelegateMiXin {
  @override
  Widget buildDayClip(DayClipModel dayClipModel) {
    return InkWell(
      child: Text("${dayClipModel.day}"),
      onTap: () {
        print(day);
      },
    );
  }
}
Implementers

Constructors

DayClipDelegate()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

buildDayClip(BuildContext context, DayClipModel? dayClipModel, OnClickedDayClip? onSelectedDayClip) Widget
构建每一个日期子类布局,其中用于显示日期,和点击效果?。
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited