搜索分类、插件与代码仓

flutter_event_calendar 封面
插件详情v1.0.0

flutter_event_calendar

适用于 Flutter 的公历和伊朗历事件日历,支持样式自定义选项

AndroidiOSWebmacOSWindowsLinux
近 30 天下载
145
喜欢数
66
Pub 分数
120

安装插件

flutter pub add flutter_event_calendar

插件介绍

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

一个用于显示公历和伊朗历日历并支持事件的 Flutter 包,提供可自定义的样式选项。它使开发者能够将其应用中集成双日历功能,同时支持国际日期系统和波斯历系统。该包设计简洁易用,具有灵活的 UI 自定义功能,非常适合跨多个平台的调度、规划或预约类应用程序。

适合场景

  • 安排预约
  • 管理双日历格式中的事件
  • 构建个人计划
  • 显示假日日历
  • 创建事件丰富的仪表板

主要特点

  • 支持公历和伊朗历
  • 可自定义的日历样式
  • 事件集成与显示
  • 跨平台兼容性
  • 易于使用的 API
  • 响应式设计

适合对象

  • 开发日历应用的开发者
  • 需要双日期系统支持的应用程序
  • 面向用户界面的调度工具
  • 面向波斯语用户的项目
  • 跨平台 Flutter 应用程序

使用建议

  • 需要手动管理事件数据
  • 样式自定义可能需要类似 CSS 的知识
  • 内置本地化功能有限,仅支持特定日历
  • 无原生时区处理
  • 依赖外部源代码以获取更新
  • 可能需要额外的状态管理来处理复杂交互

原始 README

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

flutter Event Calendar Package

Pub License: MIT


Event Calendar

How to install :

Add this to your package's pubspec.yaml file:

dependencies:
  flutter_event_calendar: ^1.0.0

Then You can install packages from the command line:

$ pub get

or

$ flutter pub get

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

Now in your Dart code, you can use:

import 'package:flutter_event_calendar/flutter_event_calendar.dart';

flutter Event Calendar Package

Basic Usage :

You can load a full calendar with events .

    return EventCalendar(
      calendarType: CalendarType.JALALI,
      calendarLanguage: 'fa',
      events: [
        Event(
          child: const Text('Laravel Event'),
          dateTime: CalendarDateTime(
            year: 1401,
            month: 5,
            day: 12,
            calendarType: CalendarType.JALALI,
          ),
        ),
      ],
    );

flutter Event Calendar Package

Options :

You have many option for changes in : style , locale and structure.

Option Type
calendarType CalendarType ( JALALI or GREGORIAN )
middleWidget Widget
events List
calendarOptions CalendarOptions
headerOptions HeaderOptions
eventOptions EventOptions
dayOptions DayOptions
showLoadingForEvent bool
specialDays List
calendarLanguage String(fa,en,pt,de)
Events
Name Description
onInit Called when Event Calendar object is inserted into the tree.
onChangeDateTime Return a string of new date selected like (year-month-day)
onMonthChanged When the month changes return a string of CalendarDateTime (year-month-day hour:minute:second)
onYearChanged When the year changes return a string of CalendarDateTime (year-month-day hour:minute:second)
onDateTimeReset When clicking on the reset button return a string of current CalendarDateTime (year-month-day hour:minute:second)
onChangeViewType When clicking on the toggleViewType return ViewType

CalendarOptions :

Option Type Description
toggleViewType bool Whether user can toggle view type between monthly and daily or not
viewType ViewType Default view type of Calendar Daily or Monthly
font String Name of your font
headerMonthBackColor Color The background color of Calendar card
headerMonthShadowColor Color The shadow color of Calendar card
headerMonthElevation double The elevation of shadow color Calendar card
headerMonthShape ShapeBorder The shape of Calendar card like(RoundedRectangleBorder)
bottomSheetBackColor Color The background color of select month and year bottom sheet)
HeaderOptions :
Option Type Description
weekDayStringType WeekDayStringTypes Day names FULL or SHORT
MonthStringTypes MonthStringTypes Month names FULL or SHORT
headerTextColor Color The color of Header Text
navigationColor Color The color of Header navigation icons
resetDateColor Color The color of reset date icon
EventOptions :
Option Type Description
emptyText String if it doesn't have any event, this text will display
emptyTextColor Color The color of empty text
emptyIcon IconData if it doesn't have any event, this icon will display
emptyIconColor Color The color of empty icon
DayOptions :
Option Type Description
weekDaySelectedColor Color The color of the Selected weekday
weekDayUnselectedColor Color The color of the UnSelected weekday
showWeekDay bool Whether weekdays show or not
compactMode bool Whether the Calendar card is compact or not
selectedBackgroundColor Color The background color of the selected day
unselectedBackgroundColor Color The background color of the unselected day
selectedTextColor Color The text color of the selected day
disabledTextColor Color The text color of the disabled day
unselectedTextColor Color The text color of the unselected day
eventCounterColor Color The background color of the event counter
eventCounterViewType DayEventCounterViewType The view type of event counter
eventCounterTextColor Color The text color of the event Counter
disableFadeEffect bool Whether days before now has fade effect or not
disableDaysBeforeNow bool Whether days before now Disabled or not
Event Structure
Option Type
child Widget
dateTime CalendarDateTime
onTap Function
onLongPress Function

Locales :

Event Calendar supports two types of calendar now . Gregorian , and Jalali .

Contribute :

You can help us and contribute for :

  • New options
  • More locales
  • Better exceptions

所属分类

依赖

依赖清单 3 项

源码仓库

使用此插件的项目

暂无相关数据。