v4.0.1flutter_calendar_week
Flutter 日历周 UI 包
41喜欢 529近 30 天下载140Pub 分数
AndroidiOSWebmacOSWindowsLinux
Flutter 日历周 UI 包
以下为英文项目原文快照,最新内容请访问 GitHub。
Flutter calendar week UI package
import 'package:flutter_calendar_week/flutter_calendar_week.dart';
CalendarWeek(
controller: CalendarWeekController(),
height: 100,
showMonth: true,
minDate: DateTime.now().add(
Duration(days: -365),
),
maxDate: DateTime.now().add(
Duration(days: 365),
),
onDatePressed: (DateTime datetime) {
// Do something
},
onDateLongPressed: (DateTime datetime) {
// Do something
},
onWeekChanged: () {
// Do something
},
monthViewBuilder: (DateTime time) => Align(
alignment: FractionalOffset.center,
child: Container(
margin: const EdgeInsets.symmetric(vertical: 4),
child: Text(
DateFormat.yMMMM().format(time),
overflow: TextOverflow.ellipsis,
textAlign: TextAlign.center,
style: TextStyle(
color: Colors.blue, fontWeight: FontWeight.w600),
)),
),
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,
),
)),
],
)
依赖清单 3 项
{"sdk":"flutter"}^0.19.0{"sdk":"flutter"}先按使用场景筛选,再比较项目活跃情况,最后到原始仓库核对使用要求。
“A repository is the most basic element of GitHub.”
GitHub Docs — About repositories ↗