搜索分类、插件与代码仓

calendar_awesome 封面
插件详情v0.0.3

calendar_awesome

一个可自定义的日历小部件,支持“波斯历”和“公历”

AndroidiOSWebmacOSWindowsLinux
近 30 天下载
50
喜欢数
8
Pub 分数
135

安装插件

flutter pub add calendar_awesome

插件介绍

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

一个高度可定制的日历小部件,支持伊朗历和公历两种日期系统。专为无缝集成到Flutter应用而设计,提供灵活的样式、事件标记以及跨月和跨年的流畅导航。该包非常适合需要根据文化或地区日期格式偏好进行日期选择的应用程序。它支持多种平台,包括Android、iOS、Web、macOS、Windows和Linux,确保广泛的兼容性。开发者可以自定义外观和行为以匹配应用的设计需求。

适合场景

  • 波斯(杰拉利)应用程序中的日期选择
  • 国际应用中的格里高利历集成
  • 使用自定义标记的事件调度
  • 多平台日期选择器
  • 可自定义的日历界面
  • 基于时间的规划工具

主要特点

  • 支持伊朗历和公历
  • 高度可定制的外观
  • 事件高亮和标记
  • 跨平台兼容性
  • 平滑的月份/年份导航
  • 开发者可扩展的 API

适合对象

  • 面向伊朗或波斯语用户的应用
  • 需要双日历支持的国际应用
  • 希望完全控制日历 UI 的开发人员
  • 需要多平台日期选择器的项目
  • 具有复杂日期交互需求的应用程序

使用建议

  • 需要手动处理伊朗历与公历之间的转换
  • 高级自定义的文档有限
  • 可能需要额外的样式才能适用于非默认主题
  • 未针对非常大的事件数据集进行优化
  • 依赖外部日期解析库

原始 README

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

calendar_awesome

A customizable calendar widget (Jalali & Gregorian) for Flutter

Image

Installation

Run this command:

flutter pub add calendar_awesome

or Include instructions on how to install your library using pubspec.yaml:

dependencies:
  calendar_awesome: ^0.0.1

Simple Usage

import 'package:calendar_awesome/calendar_awesome.dart';

CalendarAwesome(
  date: const GregorianDate(2024, 8), /// or JalaliDate(1403,5) 
  onChange: (onChangeParam) {
  print(onChangeParam.date);
  print(onChangeParam.tasks);
  print(onChangeParam.events);
  print(onChangeParam.holidays);
  }
)

Properties for CalendarAwesome

Property Description Type Required Default value
date To determine the type, year and month of the default calendar GregorianDate(2024,8)&JalaliDate(1403,5) CustomDate YES
events A list that takes the class EventClass and is shown as a dot above the days List no []
tasks A list that takes the class TaskClass and is shown linearly under the days List no []
holidays A list that takes a HolidayClass class that displays dates as holidays List no []
showWeekend Weekends are closed or not bool no true
activeSelectDate The user can choose a day or not bool no true
calendarStyle Gets the CalendarStyle class to customize the UI CalendarStyle no CalendarStyle()
header Custom header instead of default header Widget Function(PageController, Month) no null
onChange When a day is clicked, it returns the values of that day void Function(OnChangeParam) YES

Properties for CalendarStyle

Property Description Type Required Default value
weekendStyle Style text of holidays TextStyle no null
weekdayStyle Text style of days of the week TextStyle no null
textWeekdayStyle Weekday text style TextStyle no TextStyle(color: Colors.black)
direction Left to right and right to left calendar TextDirection no TextDirection.ltr
textWeekdayAngle Amount of weekday tax rotation double no 0.7
todayColor Today's color Color no Color.fromARGB(255, 70, 39, 156),
todayStyle Today's text style TextStyle no null
taskColor Task color under the days Color no Colors.greenAccent
selectDayWidth The thickness of the circle around the selected day double no 1.2
persianText Use of Persian text bool no false
scrollDirection Movement model between pages Axis no null
animationDuration Duration animation of moving between pages Duration no null
animationCurve Type of animation to move between pages Curve no null
selectDayColor The color of the circle around the selected day Color no null
weekdaysText List of text days of the week List no ["Sun", "Mon", "Tue", "Wed", "Thur", "Fri", "Sat"]

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

License

MIT

所属分类

依赖

依赖清单 5 项

源码仓库

使用此插件的项目

暂无相关数据。