kalender 0.24.0-dev.2 copy "kalender: ^0.24.0-dev.2" to clipboard
kalender: ^0.24.0-dev.2 copied to clipboard

This Flutter package offers a Calendar Widget featuring Day, MultiDay, Month and Schedule views. Moreover, it empowers you to tailor the visual aspects of the calendar widget.

pub.dev version build status live demo benchmarks license: MIT

Kalender #

A highly customizable Flutter calendar widget with Day, MultiDay, Month, and Schedule views. It supports drag-and-drop rescheduling, event resizing, timezones, and full control over appearance and behavior.

Live Demo · Benchmarks · Migration Guide

Warning

This package is still in development. API changes may occur before version 1.0.0, so pin an exact version in your pubspec.yaml rather than a caret range like ^0.24.0.

1.0.0 is close. If part of the API does not work for you, please open an issue.

Table of Contents #

Features #

  • Views: Day, Multi-day, Month and Schedule. find out more
  • Extensible events: Attach custom data (title, color, etc.) by subclassing CalendarEvent. find out more
  • Tile components: Fully customize event tiles: stationary, dragging, feedback, and resize handles. find out more
  • Reschedule: Drag and drop events between days and times.
  • Resize: Resize events with handles that adapt to mouse, stylus, trackpad or touch input.
  • Controllers: Manage your calendar with dedicated controllers. find out more
  • Callbacks: React to taps, long presses, event creation and changes. find out more
  • Configuration: Fine-grained control over interaction, snapping, scroll physics, and layout. find out more
  • Appearance: Style default components or supply custom builders. find out more
  • Event layout: Use a built-in layout strategy or supply your own. find out more
  • Locale: Localize day/month names via the intl package. find out more
  • Location: Timezone-aware display via the timezone package. find out more
  • Now callback: Override what "now" means for the time indicator and today highlighting. This is useful when the calendar's Location differs from the user's wall-clock time. find out more

Installation #

flutter pub add kalender

If you plan to use location/timezones support, also add:

flutter pub add timezone

If you plan to use locale support, also add:

flutter pub add intl

Quick Start #

The minimal setup, using only the base CalendarEvent class with no custom fields:

import 'package:flutter/material.dart';
import 'package:kalender/kalender.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(body: MyCalendar()),
    );
  }
}

class MyCalendar extends StatefulWidget {
  const MyCalendar({super.key});

  @override
  State<MyCalendar> createState() => _MyCalendarState();
}

class _MyCalendarState extends State<MyCalendar> {
  final eventsController = DefaultEventsController();
  final calendarController = CalendarController();

  @override
  Widget build(BuildContext context) {
    return CalendarView(
      eventsController: eventsController,
      calendarController: calendarController,
      viewConfiguration: MultiDayViewConfiguration.singleDay(),
      callbacks: CalendarCallbacks(
        onEventCreated: (event) => eventsController.addEvent(event),
      ),
      header: CalendarHeader(),
      body: CalendarBody(),
    );
  }
}

For a real app you almost always want custom fields on your events. See Custom Events.


Documentation #

The detailed guides live in doc/:

  • Events: attach your own data by subclassing CalendarEvent, and control how event tiles are laid out.
  • Views & Interaction: view configurations, controllers, callbacks, and interaction settings like snapping and zoom.
  • Appearance: tile builders, theming, and custom components.
  • Timezones & Locales: display timezones, localized names, and custom text.

Contributing #

Contributions are welcome! Please open an issue or pull request on GitHub.

License #

This project is licensed under the MIT License. See the LICENSE file for details.

180
likes
160
points
32.8k
downloads

Documentation

API reference

Publisher

verified publisherkdab.com

Weekly Downloads

This Flutter package offers a Calendar Widget featuring Day, MultiDay, Month and Schedule views. Moreover, it empowers you to tailor the visual aspects of the calendar widget.

Repository (GitHub)
View/report issues
Contributing

Topics

#calendar #widget

License

MIT (license)

Dependencies

collection, flutter, intl, linked_pageview, scrollable_positioned_list, timezone, universal_platform

More

Packages that depend on kalender