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.
1.0.0 is getting close. If part of the API does not work for you, please open an issue.
- 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 input-precision-aware handles (mouse/stylus/trackpad vs touch).
- 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: Built-in strategies or bring 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. Useful when the calendar's
Locationdiffers from the user's wall-clock time. find out more
flutter pub add kalenderIf you plan to use location/timezones support, also add:
flutter pub add timezoneIf you plan to use locale support, also add:
flutter pub add intlThe 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.
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.
Contributions are welcome! Please open an issue or pull request on GitHub.
This project is licensed under the MIT License. See the LICENSE file for details.
