搜索插件、代码仓与 APP 分类

calendar_timeline 封面
插件详情v1.1.3

calendar_timeline

一个水平的日期选择器,占用屏幕空间很少,因此我们可以始终将其显示出来,并且便于单手操作。

AndroidiOSWebmacOSWindowsLinux
近 30 天下载
1390
喜欢数
434
Pub 分数
130

安装插件

flutter pub add calendar_timeline

插件介绍

基于插件公开信息、社区数据与项目使用情况整理的选型参考。

CalendarTimeline 是一个紧凑的水平日期选择器,专为高效的一只手操作和最小化屏幕空间而设计。它始终显示当前日期,非常适合需要频繁选择日期的应用程序。时间轴布局使用户可以无缝滑动浏览天、周或月。基于 Flutter 构建,支持 Android、iOS、Web、macOS、Windows 和 Linux 等多个平台。其简洁的界面在表单、日程安排工具和每日计划中提升了可用性。

适合场景

  • 每日任务跟踪
  • 调度应用程序
  • 活动策划
  • 以移动设备为先的日期选择
  • 单手导航

主要特点

  • 水平可滚动的时间轴
  • 紧凑设计
  • 单手操作可用性
  • 跨平台支持
  • 可自定义日期范围

适合对象

  • 移动应用开发人员
  • 生产力应用
  • 日历集成
  • 极简主义用户界面设计
  • 时间敏感的工作流程

使用建议

  • 仅限选择日期
  • 无内置事件渲染
  • 需要手动处理日期更改
  • 最适合线性时间导航
  • 可能需要额外的样式以支持深色模式

原始 README

以下为关联源码仓库的 README 原文快照,最新内容请访问源码仓库。

header.jpg

Flutter widget form select a date in horizontal timeline with customizable styles.

Getting Started

You can use this package when you need to add a date picker that takes up little screen space, so we can always have it visible, and that facilitates use with one hand.

example.gif

Properties

Property Type Description
initialDate DateTime Initial date selected
firstDate DateTime First date available in calendar
lastDate DateTime Last date available in calendar
selectableDayPredicate SelectableDayPredicate Signature for predicating dates for enabled date selections
onDateSelected OnDateSelected Callback to notify that a date has been selected
leftMargin double Left margin to month and day list
monthColor Color Color for month list elements
dayColor Color Color for day list elements
activeDayColor Color Color for selected day text
activeBackgroundDayColor Color Color for selected day background
dotColor Color Color for top dots in select day
locale String Locale string to get formatted date
showYears bool Indicates if it show year selector

Use example

You can review the example folder for a complete example of using the widget.

CalendarTimeline(
  initialDate: DateTime(2020, 4, 20),
  firstDate: DateTime(2019, 1, 15),
  lastDate: DateTime(2020, 11, 20),
  onDateSelected: (date) => print(date),
  leftMargin: 20,
  monthColor: Colors.blueGrey,
  dayColor: Colors.teal[200],
  activeDayColor: Colors.white,
  activeBackgroundDayColor: Colors.redAccent[100],
  dotsColor: Color(0xFF333A47),
  selectableDayPredicate: (date) => date.day != 23,
  locale: 'en_ISO',
)

所属分类

依赖

依赖清单 2 项

源码仓库

使用此插件的项目