Pub. Dev /packages/fl… pub. Dev /packages/fl… pub. Dev /packages/ FL… Flutter_calendar_carousel: ^ 2.1.0

Effect:Import: import ‘package:flutter_calendar_carousel/flutter_calendar_carousel.dart’; // Calendar 2

CalendarCarousel(
    // Date click event
    onDayPressed: (DateTime date, List events) {
        // date Click date
    },
    // The maximum value can be before today
    maxSelectedDate: DateTime.now(),
    / / language
    locale: 'zh'.// When the month changes
    onCalendarChanged: (e) {
        print('* * * * * *' + e.toString());// Change the start date of the month
        DateTimeList = dateTimeList = dateTimeList = dateTimeList
    },
    thisMonthDayBorderColor: Colors.grey,
    customDayBuilder: (
        bool isSelectable,
        int index,
        bool isSelectedDay,
        bool isToday,
        bool isPrevMonthDay,
        TextStyle textStyle,
        bool isNextMonthDay,
        bool isThisMonthDay,
        DateTime day,
    ) {
        // The default flag
        // The dateTimeList is a List
      
        array. Contains contains a List containing day
      
        // Where day is every day of the month, the plugin will automatically loop through each day and determine if the current day is in the default tag
        if (dateTimeList.contains(day)) {
            return Center(
                child: Text(
                    day.day.toString(),
                    style: TextStyle(
                        color: Colors.blue,
                    ),
                ),
            );
        } else {
            return null;
        }
    },
    weekendTextStyle: TextStyle(color: Colors.black),// Saturday Sunday color
    height: 420.0./ / height
    selectedDateTime: _currentDate,// The selected day
    daysHaveCircularBorder: false,);Copy the code