Flutter_custom_calendar

Flutter的一个日历控件
Alternatives To Flutter_custom_calendar
Project NameStarsDownloadsRepos Using ThisPackages Using ThisMost Recent CommitTotal ReleasesLatest ReleaseOpen IssuesLicenseLanguage
Appflowy33,182
a day ago6August 29, 2022454agpl-3.0Dart
AppFlowy is an open-source alternative to Notion. You are in charge of your data and customizations. Built with Flutter and Rust.
Zefyr2,123556 months ago19December 19, 2021228Dart
Soft and gentle rich text editing for Flutter applications.
Uiwidgets1,861
2 years ago45otherC#
UIWidget is a Unity Package which helps developers to create, debug and deploy efficient, cross-platform Apps.
Flutter Quill1,824
2 days ago106mitDart
Rich text editor for Flutter
Extended_image1,60023112 months ago106May 17, 202218mitDart
A powerful official extension library of image, which support placeholder(loading)/ failed state, cache network, zoom pan image, photo view, slide out page, editor(crop,rotate,flip), paint custom etc.
Super_editor1,090
2 days ago150mitDart
A Flutter toolkit for building document editors and readers
Com.unity.uiwidgets566
7 months ago21otherC#
UIWidgets is a Unity Package which helps developers to create, debug and deploy efficient, cross-platform Apps.
Flutter_custom_calendar384
3 years ago35bsd-2-clauseDart
Flutter的一个日历控件
Noteless321
2 years ago23mitDart
A Markdown-based note-taking app for mobile devices.
Flutter_image_editor3212216 days ago28November 14, 202217apache-2.0Dart
Flutter plugin, support android/ios.Support crop, flip, rotate, color martix, mix image, add text. merge multi images.
Alternatives To Flutter_custom_calendar
Select To Compare


Alternative Project Comparisons
Readme

flutter_custom_calendar

本插件是基于flutter_custom_calendar做了稍微的修改进行上传的。

具体使用方法见flutter_custom_calendar

新增一个选择mode

支持选择开始和结束,选择范围内的日期,使用方法

controller = new CalendarController(
    minYear: 2019,
    minYearMonth: 1,
    maxYear: 2021,
    maxYearMonth: 12,
    showMode: CalendarConstants.MODE_SHOW_MONTH_AND_WEEK,
    selectedDateTimeList: _selectedDate,
    selectMode: CalendarSelectedMode.mutltiStartToEndSelect)
  ..addOnCalendarSelectListener((dateModel) {
    _selectedModels.add(dateModel);
  })
  ..addOnCalendarUnSelectListener((dateModel) {
    if (_selectedModels.contains(dateModel)) {
      _selectedModels.remove(dateModel);
    }
  });

CalendarSelectedMode.mutltiStartToEndSelect这个选择模式会选择开始和结束中间的 默认选择的。

安装和使用

Use this package as a library

  1. Depend on it Add this to your package's pubspec.yaml file:
dependencies:
  flutter_custom_calendar: ^1.0.4+0.5
  1. Install it You can install packages from the command line:

with Flutter:

$ flutter pub get

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

  1. Import it Now in your Dart code, you can use:
import 'package:flutter_custom_calendar/flutter_custom_calendar.dart';

监听月视图和周视图状态

  controller.addExpandChangeListener((value) {
    /// 添加改变 月视图和 周视图的监听
    _isMonthSelected = value;
    setState(() {});
  });
});

变更月视图和周视图

前提条件是showModelCalendarConstants.MODE_SHOW_MONTH_AND_WEEK或者CalendarConstants.MODE_SHOW_WEEK_AND_MONTH.

变更到周视图

 setState(() {
 controller.weekAndMonthViewChange(CalendarConstants.MODE_SHOW_ONLY_WEEK);
                  });

变更到月视图

setState(() {controller.weekAndMonthViewChange(CalendarConstants.MODE_SHOW_ONLY_MONTH);
                  });

动画演示

查看API

查看一个例子 如何使用

Popular Flutter Projects
Popular Editor Projects
Popular User Interface Categories

Get A Weekly Email With Trending Projects For These Categories
No Spam. Unsubscribe easily at any time.
Dart
Flutter
Editor
Calendar