aes_calendar 0.0.7
aes_calendar: ^0.0.7 copied to clipboard
description: A lightweight and customizable Flutter calendar package featuring year-month selector, wheel picker, and flexible date utilities.
aes_calendar #
A customizable and lightweight Flutter calendar widget with:
- Dialog popup mode
- Full-screen/widget mode
- Built-in yearβmonth selector and wheel picker support
aes_calendar makes it easy to integrate a clean, theme-aware calendar into your Flutter app with minimal configuration, while still allowing full color and text customization.
πΈ Preview #
Dialog + full-screen examples from the bundled example app:

β¨ Features #
- π Interactive calendar UI
- π Year & Month selector dialog with wheel pickers
- π¬ Two display modes: dialog popup and full-screen/widget
- π― Date selection callback
- π Optional min/max date restriction
- π¨ Fully themable via
AesCalendarTheme - π€ Customizable button labels via
AesCalendarTexts - π§© Lightweight and easy to integrate
π¦ Installation #
Add the dependency in your pubspec.yaml:
dependencies:
aes_calendar: ^0.0.7
Check pub.dev for the latest version.
Then run:
flutter pub get
π Basic Usage #
Import the package:
import 'package:aes_calendar/aes_calendar.dart';
There are two main ways to use the calendar.
1. Dialog popup #
final selected = await AesCalendar.show(
context,
startDate: DateTime(2020, 1, 1),
endDate: DateTime(2030, 12, 31),
);
if (selected != null) {
print('Selected date: $selected');
}
2. Full-screen / embedded widget #
class CalendarExample extends StatefulWidget {
const CalendarExample({super.key});
@override
State<CalendarExample> createState() => _CalendarExampleState();
}
class _CalendarExampleState extends State<CalendarExample> {
DateTime selectedDate = DateTime.now();
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(title: const Text('Aes Calendar Example')),
body: Center(
child: AesCalendar(
selectedDate: selectedDate,
endDate: DateTime(2030),
onDateSelected: (date) {
setState(() {
selectedDate = date;
});
},
),
),
);
}
}
π§© Parameters #
AesCalendar widget #
| Parameter | Type | Required | Description |
|---|---|---|---|
startDate |
DateTime? |
β No | Minimum selectable date |
endDate |
DateTime? |
β No | Maximum selectable date |
selectedDate |
DateTime? |
β No | Initially selected date |
onDateSelected |
ValueChanged<DateTime>? |
β No | Callback when user selects a date |
showAsDialog |
bool |
β No | Internal flag for dialog mode (use AesCalendar.show) |
theme |
AesCalendarTheme? |
β No | Visual customization (colors, radius, text styles, icons) |
texts |
AesCalendarTexts? |
β No | Text customization (button labels, etc.) |
monthLabelBuilder |
String Function(DateTime)? |
β No | Custom month title builder for the header |
AesCalendar.show (dialog helper) #
static Future<DateTime?> show(
BuildContext context, {
DateTime? selectedDate,
DateTime? startDate,
DateTime? endDate,
AesCalendarTheme? theme,
AesCalendarTexts? texts,
String Function(DateTime month)? monthLabelBuilder,
})
π¨ Customization #
Theme (colors, shapes, icons, text styles) #
Use AesCalendarTheme to override visuals. Any field you omit falls back to sensible defaults based on Theme.of(context):
AesCalendar(
selectedDate: selectedDate,
endDate: DateTime(2030),
theme: const AesCalendarTheme(
selectedDayBackgroundColor: Colors.teal,
selectedDayTextColor: Colors.white,
todayBackgroundColor: Color(0x332196F3),
todayTextColor: Colors.black,
disabledDayTextColor: Colors.redAccent,
dayBorderRadius: BorderRadius.all(Radius.circular(12)),
previousMonthIcon: Icons.arrow_back_ios_new,
nextMonthIcon: Icons.arrow_forward_ios,
),
onDateSelected: (date) => setState(() => selectedDate = date),
);
Key fields:
selectedDayBackgroundColor,selectedDayTextColortodayBackgroundColor,todayTextColordisabledDayTextColor,dayTextColordayBorderRadiusheaderTextStyle,dayTextStylepreviousMonthIcon,nextMonthIcon
Texts (button labels) #
Use AesCalendarTexts to customize dialog buttons:
AesCalendar(
texts: const AesCalendarTexts(
cancelLabel: 'Close',
okLabel: 'Select',
),
);
Custom month header format #
AesCalendar(
monthLabelBuilder: (month) =>
DateFormat('MMMM yyyy').format(month),
);
π Example Project #
A full working example is available in the /example folder of this package.
To run it locally:
cd example
flutter run
π Version #
Current version: 0.0.6
See CHANGELOG.md for release history and changes.
π Requirements #
- Flutter SDK >= 3.0.0
- Dart SDK >= 3.0.0
π License #
This project is licensed under the MIT License.
π€ Contributions #
Contributions, issues, and feature requests are welcome.
If you like this package, consider giving it a β on GitHub.