搜尋套件、儲存庫與 APP 分類

scrollable_clean_calendar 封面
套件詳情v1.5.0

scrollable_clean_calendar

一個乾淨的日曆小部件,支援垂直捲動、地區設定和範圍選擇日期

AndroidiOSWebmacOSWindowsLinux
近 30 天下載
1萬
喜歡數
178
Pub 分數
150

安裝套件

flutter pub add scrollable_clean_calendar

套件介紹

根據套件公開資料產生的選型評估,僅供參考。

一個乾淨、可垂直捲動的 Flutter 日曆小工具,支援地區設定自訂與日期範圍選擇。設計簡潔且易於使用,允許使用者透過平滑捲動瀏覽月份,並直覺地選擇日期範圍。此套件相容於所有主要平台,包含 Android、iOS、Web、macOS、Windows 與 Linux。適合需要 minimalist 但具備功能性的日曆介面並支援國際化的應用程式。

適用情境

  • 預訂應用中的日期範圍選擇
  • 任務管理工具中的日曆視圖
  • 基於區域設定的排程介面
  • 旅行或活動規劃應用
  • 使用者資料日期輸入表單

主要特色

  • 垂直滾動導航
  • 語言區域支援
  • 日期範圍選擇
  • 極簡設計
  • 跨平台相容性
  • 可自訂樣式

適合對象

  • 開發排程或預訂功能的開發者
  • 需要國際化日期選擇器的應用程式
  • 重視簡潔UI設計的專案
  • Flutter 應用針對多個平台
  • 尋求輕量級日曆解決方案的使用者

使用建議

  • 僅限垂直捲動
  • 無內建的月份/年份選擇控制項
  • 需要手動處理日期範圍邏輯
  • 未針對大日期範圍進行優化
  • 可能需要額外的樣式來支援複雜主題

原始 README

以下為關聯原始碼儲存庫的 README 原文快照,最新內容請造訪原始碼儲存庫。

Pub GitHub contributors

Scrollable Clean Calendar

A clean calendar widget with vertical scroll, locale and range selection date.

Contributors


Rodrigo Dobbin Fellows

Eduardo Natale

Fabio Fiuza

Filippo Pizzicola

Lucian Risso Correia

Installation

Add

scrollable_clean_calendar: 1.5.0

to your pubspec.yaml and run

flutter pub get

in the project's main folder.

Parameters

ScrollableCleanCalendar
Parameter Type Default Description
calendarController CleanCalendarController required The controller of ScrollableCleanCalendar
locale String en The language locale
scrollController ScrollController null Scroll controller, if you use this controller the Parameter initialFocusDate and the Functions scrollToMonth and jumpToMonth won't work since this override the scrollable list controller. Do not use them together or you will receive a nullPointer Exception
showWeekdays bool true If is to show or not the weekdays in calendar
layout Layout null What layout (design) is going to be used. Important: layout is required if you don't use all the layout builders
spaceBetweenMonthAndCalendar double 24 The space between month and calendar
spaceBetweenCalendars double 24 The space between calendars
initialFocusDate DateTime null Initial date that the calendar scroll should focus when open
scrollToMonth Function({required DateTime date, double alignment = 0, required Duration duration, Curve curve = Curves.linear, List<double> opacityAnimationWeights = const [40, 20, 40]}) null Animate the list over duration using the given curve such that the item at index ends up with its leading edge at the given alignment.
jumpToMonth Function ({required DateTime date, double alignment = 0}) null Immediately, without animation, reconfigure the list so that the item at index's leading edge is at the given alignment.
calendarCrossAxisSpacing double 4 The horizontal space in the calendar dates
calendarMainAxisSpacing double 4 The vertical space in the calendar dates
padding EdgeInsetsGeometry EdgeInsets.symmetric(horizontal: 16, vertical: 32) The parent padding
monthTextStyle TextStyle Theme.of(context).textTheme.headline6 The label text style of month
monthTextAlign TextAlign TextAlign.left The label text align of month
weekdayTextStyle TextStyle Theme.of(context).textTheme.bodyText1 The label text align of month
weekdayAspectRatio double 1.0 The aspect ratio of weekday items
dayTextStyle TextStyle Theme.of(context).textTheme.bodyText1 The label text style of day
dayAspectRatio double 1.0 The aspect ratio of day items
daySelectedBackgroundColor Color Theme.of(context).colorScheme.primary The day selected background color
dayBackgroundColor Color Theme.of(context).colorScheme.surface The day background color
daySelectedBackgroundColorBetween Color Theme.of(context).colorScheme.primary.withOpacity(.3) The day selected background color that is between day selected edges
dayDisableBackgroundColor Color Theme.of(context).colorScheme.surface.withOpacity(.4) The day disable background color
dayDisableColor Color Theme.of(context).colorScheme.onSurface.withOpacity(.5) The day disable color
dayRadius double 6 The radius of day items
monthBuilder Widget Function(BuildContext context, String month) null A builder to make a customized month
weekdayBuilder Widget Function(BuildContext context, String weekday) null A builder to make a customized weekday
dayBuilder Widget Function(BuildContext context, DayValues values) null A builder to make a customized day of calendar
CleanCalendarController
Parameter Type Default Description
minDate DateTime required Obrigatory: The mininimum date to show
maxDate DateTime required Obrigatory: The maximum date to show
initialDateSelected DateTime null An initial selected date
endDateSelected DateTime null The end of selected range
weekdayStart int DateTime.monday In what weekday position the calendar is going to start
onDayTapped Function(DateTime date) null Function when a day is tapped
onRangeSelected Function(DateTime minDate, DateTime? maxDate) null Function when a range is selected
onPreviousMinDateTapped Function(DateTime date) null When a date before the min date is tapped
onAfterMaxDateTapped Function(DateTime date) null When a date after max date is tapped
rangeMode bool true If the range is enabled
readOnly bool false If the Calendar Widget is on read-only mode

Layout.DEFAULT

ScrollableCleanCalendar(
  calendarController: calendarController,
  layout: Layout.DEFAULT,
),

Layout.BEAUTY

ScrollableCleanCalendar(
  calendarController: calendarController,
  layout: Layout.BEAUTY,
  calendarCrossAxisSpacing: 0,
),

所屬分類

依賴

依賴清單 2 項

原始碼儲存庫

使用此套件的專案