flutter_linear_calendar 0.0.6 copy "flutter_linear_calendar: ^0.0.6" to clipboard
flutter_linear_calendar: ^0.0.6 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.


πŸ“Έ Screenshots #

To limit the display size of screenshots in your README.md, you can use HTML <img> tags instead of Markdown ![alt](url) syntax. This allows you to control the width for a cleaner and more consistent layout.

Here’s your updated section with size-limited images:


πŸ“Έ Screenshots #

πŸ”Ή Default Usage #

LinearCalendar(
  startDate: DateTime.now(),
  onDateChanged: (date) {
    debugPrint('Selected date: $date');
  },
)

Linear Calendar Screenshot


πŸ”Έ Customized Style #

LinearCalendar(
  startDate: DateTime(2025, 5, 15),
  selectedColor: Colors.deepPurple,
  unselectedColor: Colors.grey,
  foregroundColor: Colors.white,
  onDateChanged: (date) {
    debugPrint('Selected date: $date');
  },
)

Linear Calendar Screenshot 2



✨ 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

2
likes
160
points
88
downloads

Publisher

unverified uploader

Weekly Downloads

A reusable horizontal date selector widget for Flutter.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on flutter_linear_calendar