aes_calendar
A customizable and lightweight Flutter calendar widget with built-in yearβmonth selector and wheel picker support.
aes_calendar makes it easy to integrate a clean, interactive calendar into your Flutter app with minimal configuration.
β¨ Features
- π Interactive calendar UI
- π Year & Month selector
- π‘ Wheel-style date picker
- π― Date selection callback
- π Optional maximum date restriction
- π§© Lightweight and easy to integrate
π¦ Installation
Add the dependency in your pubspec.yaml:
dependencies:
aes_calendar: ^0.0.1
Then run:
flutter pub get
π Basic Usage
Import the package:
import 'package:aes_calendar/aes_calendar.dart';
Use AesCalendar inside your widget:
AesCalendar(
selectedDate: DateTime.now(),
endDate: DateTime(2030),
onDateSelected: (date) {
print("Selected Date: $date");
},
)
π§© Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
selectedDate |
DateTime |
β Yes | Initially selected date |
endDate |
DateTime? |
β No | Maximum selectable date |
onDateSelected |
ValueChanged<DateTime> |
β Yes | Callback when date changes |
π Complete Example
import 'package:flutter/material.dart';
import 'package:aes_calendar/aes_calendar.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return const MaterialApp(
home: CalendarExample(),
);
}
}
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;
});
},
),
),
);
}
}
π Example Project
A full working example is available in the /example folder of this package.
To run it locally:
cd example
flutter run
π 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.