We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to customize the schedule view in the Flutter Calendar


In the Flutter Event Calendar, you can customize appointment item height, appointment text, day header, week header, month header of the `scheduleView` using the properties of `ScheduleViewSettings` in `SfCalendar`.

body: SafeArea(
  child: SfCalendar(
    view: CalendarView.schedule,
    dataSource: getCalendarDataSource(),
    scheduleViewSettings: ScheduleViewSettings(
        appointmentTextStyle: TextStyle(
            fontSize: 12,
            fontWeight: FontWeight.w500,
            color: Colors.lime),
        appointmentItemHeight: 70.0,
        dayHeaderSettings: DayHeaderSettings(
            dayFormat: 'EEEE',
            width: 70,
            dateTextStyle: TextStyle(
              fontSize: 20,
              fontWeight: FontWeight.w300,
              color: Colors.red,
            ),
            dayTextStyle: TextStyle(
              fontSize: 10,
              fontWeight: FontWeight.w300,
              color: Colors.red,
            )),
        hideEmptyScheduleWeek: true,
        monthHeaderSettings: MonthHeaderSettings(
            monthFormat: 'MMMM, yyyy',
            height: 100,
            textAlign: TextAlign.left,
            backgroundColor: Colors.green,
            monthTextStyle: TextStyle(
                color: Colors.red,
                fontSize: 25,
                fontWeight: FontWeight.w400)),
        weekHeaderSettings: WeekHeaderSettings(
          startDateFormat: 'dd MMM ',
          endDateFormat: 'dd MMM, yy',
          height: 50,
          textAlign: TextAlign.center,
          backgroundColor: Colors.red,
          weekTextStyle: TextStyle(
            color: Colors.white,
            fontWeight: FontWeight.w400,
            fontSize: 15,
          ),
        )),
  ),
),

By using the hideEmptyScheduleWeek, you can hide the weeks that do not have appointments.

Reference blog: https://www.syncfusion.com/blogs/post/introducing-the-new-schedule-view-in-flutter-event-calendar.aspx

View sample in GitHub

 

scheduleview customization

 

 

 

ADD COMMENT
You must log in to leave a comment

Please sign in to access our KB

This page will automatically be redirected to the sign-in page in 10 seconds.

Up arrow icon

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile