搜索分类、插件与代码仓

GitHub 代码仓mahdi-sharifii/calendar_awesome

calendar_awesome

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

calendar_awesome 项目封面
星标
2
复刻
0
最近推送(UTC)
2024年9月7日
项目状态
未归档

原始 README

以下为英文项目原文快照,最新内容请访问 GitHub。

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

mahdi GitHub avatar
GitHub 作者

mahdi ↗

Flutter developer/mobile developer

Iran , Kerman
语言DartC++CMakeSwiftCHTMLKotlinObjective-C

此仓库发布的插件

使用的依赖

依赖清单 8 项

如何选择适合项目的代码仓?

先按使用场景筛选,再比较项目活跃情况,最后到原始仓库核对使用要求。

  1. 通过仓库名、作者或描述搜索,再按技术分类缩小范围。
  2. 结合星标、复刻与最近推送比较项目;星标反映社区关注,不代表质量保证。
  3. 使用前在 GitHub 核对 README、许可证与 Issues。

来源与维护

“A repository is the most basic element of GitHub.”

GitHub Docs — About repositories ↗