animated_calendar 1.0.2
animated_calendar: ^1.0.2 copied to clipboard
A beautiful, animated calendar package for Flutter with a blue-and-white theme.
Animated Calendar #
Welcome to the Animated Calendar package! This modern and visually appealing calendar is designed for Flutter applications, featuring smooth animations and a stunning blue-and-white theme.
π Features #
- π¨ Stylish UI: Enjoy a sleek and modern blue-and-white theme.
- π Smooth Animations: Experience seamless date selection animations.
- π Flexible Views: Effortlessly switch between month and week views.
π¦ Installation #
To get started, add the package to your pubspec.yaml:
dependencies:
animated_calendar: ^1.0.1
π Getting Started #
Here's a quick example to help you integrate the Animated Calendar into your Flutter app:
import 'package:animated_calendar/animated_calendar.dart';
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
appBar: AppBar(
title: Text('Animated Calendar Example'),
),
body: Center(
child: AnimatedCalendar(
initialDate: DateTime.now(),
onDateChanged: (date) {
print('Selected date: $date');
},
),
),
),
);
}
}
π Advanced Usage #
Customizing the Theme #
You can easily customize the colors and styles of the calendar to fit your app's theme:
AnimatedCalendar(
initialDate: DateTime.now(),
theme: CalendarTheme(
primaryColor: Colors.blue,
secondaryColor: Colors.white,
todayColor: Colors.orange,
selectedDateColor: Colors.green,
weekendTextColor: Colors.red,
),
onDateChanged: (date) {
print('Selected date: $date');
},
)
Handling Date Selection #
The onDateChanged callback provides the selected date, allowing you to handle date changes as needed:
AnimatedCalendar(
initialDate: DateTime.now(),
onDateChanged: (date) {
// Perform any action with the selected date
print('Selected date: $date');
},
)
Switching Between Views #
You can programmatically switch between month and week views using the viewMode parameter:
AnimatedCalendar(
initialDate: DateTime.now(),
viewMode: ViewMode.month, // or ViewMode.week
onDateChanged: (date) {
print('Selected date: $date');
},
)
π― Best Practices #
- Ensure that the
initialDateis set to the current date or a relevant date for your application. - Customize the theme to match your app's design for a consistent user experience.
- Use the
onDateChangedcallback to handle date selection changes effectively.
π οΈ Contributing #
We welcome contributions! If you'd like to contribute, please check out our [contribution guidelines].
π License #
This project is licensed under the MIT License. See the LICENSE file for more details.
π¬ Support #
If you have any questions, feel free to open an issue or join our community chat.
π Contact #
For more information or support, please contact the publisher:
- Name: Kavindu Malshan Jayasinghe
- Email: kavindu11250403@gmail.com
- GitHub: kavindumal
Thank you for using Animated Calendar! We hope it brings life and elegance to your Flutter applications. Happy coding! π