flutter calendar view
a calendar view by week.
ios | android:
web:
use:
dependencies:
flutter_calendar_week:
git:
url: https://github.com/mduccc/flutter_calendar_week
ref: 0.1.0
calendarweek(
height: 80,
mindate: datetime.now().add(
duration(days: -365),
),
maxdate: datetime.now().add(
duration(days: 365),
),
ondatepressed: (datetime datetime) {
setstate(() {
_selecteddate = datetime;
});
},
ondatelongpressed: (datetime datetime) {
setstate(() {
_selecteddate = datetime;
});
},
dayofweekstyle:
textstyle(color: colors.blue, fontweight: fontweight.w600),
dayofweekalignment: fractionaloffset.bottomcenter,
datestyle:
textstyle(color: colors.blue, fontweight: fontweight.w400),
datealignment: fractionaloffset.topcenter,
todaydatestyle:
textstyle(color: colors.orange, fontweight: fontweight.w400),
todaybackgroundcolor: colors.black.withopacity(0.15),
presseddatebackgroundcolor: colors.blue,
presseddatestyle:
textstyle(color: colors.white, fontweight: fontweight.w400),
datebackgroundcolor: colors.transparent,
backgroundcolor: colors.white,
dayofweek: ['mon', 'tue', 'wed', 'thu', 'fri', 'sat', 'sun'],
spacebetweenlabelanddate: 0,
dayshapeborder: circleborder(),
decorations: [
decorationitem(
decorationalignment: fractionaloffset.bottomright,
date: datetime.now(),
decoration: icon(
icons.today,
color: colors.blue,
)),
decorationitem(
date: datetime.now().add(duration(days: 3)),
decoration: text(
'holiday',
style: textstyle(
color: colors.brown,
fontweight: fontweight.w600,
),
)),
],
);
Comments are closed.