You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
xiaodong 390a826be4
增加英文文档
5 years ago
.idea 创建example的module 5 years ago
example 增加英文文档 5 years ago
lib 代码格式优化,删掉没用的代码 5 years ago
.gitignore 删除根目录 5 years ago
.metadata 删除根目录 5 years ago
API.md format readme 5 years ago
API_en.md 增加英文文档 5 years ago
CHANGELOG.md readme文档修改,增加英文说明 5 years ago
LICENSE 删除根目录 5 years ago
README.md format readme 5 years ago
README_en.md format readme 5 years ago
flutter_custom_calendar.iml 删除根目录 5 years ago
pubspec.lock 创建configuration类,将配置的信息放到这里 5 years ago
pubspec.yaml 创建configuration类,将配置的信息放到这里 5 years ago

README_en.md

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

FlutterCalendarWidget

A calendar widget in flutter,you can design what you want to show!

Language:English|中文简体

Overview

  • Support the Gregorian calendar, lunar calendar, solar terms, traditional festivals and common holidays
  • Date range setting, the maximum date range supported by default is 1971.01-2055.12
  • Disable date range settings. For example, you can click within a range of dates and gray the dates outside the range
  • Support single selection and multiple selection modes, and provide multiple selection of callbacks exceeding the limit and multiple selection of callbacks exceeding the specified range.
  • Jump to the specified date. Animation switching is supported by default
  • Custom Calendar items, support the way of combining widgets and drawing with canvas
  • Customize the weekbar at the top
  • According to the actual scene, you can add custom additional data to the item to realize various additional functions. For example, to realize the calendar of progress bar style and various marks of calendar
  • Support weekly view display, monthly view and weekly view display and switching linkage

Online Demo

Calendar supports web PreviewClick here for preview

Example

Getting Started

1.add dependencies into you project pubspec.yaml file:

flutter_custom_calendar:
    git:
      url: https://github.com/LXD312569496/flutter_custom_calendar.git

2.import flutter_custom_calendar lib

import 'package:flutter_custom_calendar/flutter_custom_calendar.dart';

3.create CalendarViewWidget objectprofile CalendarController

CalendarController controller= new CalendarController(
        minYear: 2018,
        minYearMonth: 1,
        maxYear: 2020,
        maxYearMonth: 12,
        showMode: CalendarConstants.MODE_SHOW_MONTH_AND_WEEK);
CalendarViewWidget calendar= CalendarViewWidget(
              calendarController: controller,
            ),

4.operate controller

controller.toggleExpandStatus();//Switch between month view and week view
controller.previousPage();//Action calendar switch to previous page
controller.nextPage();//Action calendar switch to next page

2.0 version

Major changes

  • The UI configuration related parameters are moved to the calendar view construction method (the old version is configured in the controller)
  • Calendar supports padding and margin attributes, and item size calculation and modification.
  • Realize the overall adaptive height of calendar
  • The controller provides the method of changing extradatamap, which can dynamically modify the customized data extradatamap at any time.
  • It supports the display of monthly view and weekly view, with weekly view as the priority, and mode "show" week "and" month "
  • Supports verticalspacing and itemsize properties

matters needing attention

  • If you use the version before 2.0, you need to move the UI configuration related parameters to the calendar view construction method (the old version is configured in the controller).
  • I haven't found any other problems for the time being. If you have any, please let me know.
  • If you use this library to make a calendar, you can share the display results with me, and I will paste them on the document for display.

API Documentation

API Documentation