flutter_linear_calendar 0.0.4
flutter_linear_calendar: ^0.0.4 copied to clipboard
A reusable horizontal date selector widget for Flutter.
๐ LinearCalendar #
A customizable, horizontally scrollable calendar widget for Flutter, built for simplicity and flexibility.
โจ Features #
- Horizontal scrolling calendar view
- Highlights today's date
- Customizable selection color
- Callback on date selection
- Lightweight and easy to integrate
๐ Installation #
Add the package to your pubspec.yaml:
dependencies:
linear_calendar: ^0.0.3
Then run:
flutter pub get
๐งฉ Parameters #
| Property | Type | Required | Description |
|---|---|---|---|
startDate |
DateTime |
โ | Start of the calendar range |
endDate |
DateTime? |
โ | End of the calendar range (defaults to 30 days ahead) |
onDateChanged |
ValueChanged<DateTime> |
โ | Called when a date is selected |
selectedColor |
Color? |
โ | Background color for the selected date |
unselectedColor |
Color? |
โ | Background color for unselected dates |
foregroundColor |
Color? |
โ | Text color for the dates |
scrollController |
ScrollController? |
โ | Custom scroll controller for the calendar |
๐งช Example #
LinearCalendar(
startDate: DateTime.now().subtract(Duration(days: 15)),
endDate: DateTime.now().add(Duration(days: 30)),
selectedColor: Colors.blueAccent,
unselectedColor: Colors.grey[200],
foregroundColor: Colors.black,
onDateChanged: (date) => debugPrint("Date tapped: $date"),
)
๐ License #
MIT
๐ค Author #
Developed by PearlGrell