Introducing the New Schedule View in Flutter Event Calendar | Syncfusion Blogs
Live Chat Icon For mobile
Live Chat Icon
Popular Categories.NET  (175).NET Core  (29).NET MAUI  (208)Angular  (109)ASP.NET  (51)ASP.NET Core  (82)ASP.NET MVC  (89)Azure  (41)Black Friday Deal  (1)Blazor  (220)BoldSign  (14)DocIO  (24)Essential JS 2  (107)Essential Studio  (200)File Formats  (66)Flutter  (133)JavaScript  (221)Microsoft  (119)PDF  (81)Python  (1)React  (101)Streamlit  (1)Succinctly series  (131)Syncfusion  (919)TypeScript  (33)Uno Platform  (3)UWP  (4)Vue  (45)Webinar  (51)Windows Forms  (61)WinUI  (68)WPF  (159)Xamarin  (161)XlsIO  (36)Other CategoriesBarcode  (5)BI  (29)Bold BI  (8)Bold Reports  (2)Build conference  (8)Business intelligence  (55)Button  (4)C#  (150)Chart  (132)Cloud  (15)Company  (443)Dashboard  (8)Data Science  (3)Data Validation  (8)DataGrid  (63)Development  (633)Doc  (8)DockingManager  (1)eBook  (99)Enterprise  (22)Entity Framework  (5)Essential Tools  (14)Excel  (40)Extensions  (22)File Manager  (7)Gantt  (18)Gauge  (12)Git  (5)Grid  (31)HTML  (13)Installer  (2)Knockout  (2)Language  (1)LINQPad  (1)Linux  (2)M-Commerce  (1)Metro Studio  (11)Mobile  (508)Mobile MVC  (9)OLAP server  (1)Open source  (1)Orubase  (12)Partners  (21)PDF viewer  (43)Performance  (12)PHP  (2)PivotGrid  (4)Predictive Analytics  (6)Report Server  (3)Reporting  (10)Reporting / Back Office  (11)Rich Text Editor  (12)Road Map  (12)Scheduler  (52)Security  (3)SfDataGrid  (9)Silverlight  (21)Sneak Peek  (31)Solution Services  (4)Spreadsheet  (11)SQL  (11)Stock Chart  (1)Surface  (4)Tablets  (5)Theme  (12)Tips and Tricks  (112)UI  (387)Uncategorized  (68)Unix  (2)User interface  (68)Visual State Manager  (2)Visual Studio  (31)Visual Studio Code  (19)Web  (597)What's new  (333)Windows 8  (19)Windows App  (2)Windows Phone  (15)Windows Phone 7  (9)WinRT  (26)
Introducing the New Schedule View in Flutter Event Calendar

Introducing the New Schedule View in Flutter Event Calendar

The schedule view is a discrete view integrated into our Calendar widget that shows a list of scheduled appointments grouped by week, between minimum and maximum dates. This feature is available in our 2020 Volume 2 release.

Through this feature, you can display a list of appointments along with day, week, and month headers. You can assign unique styles to the available headers. This rich feature set includes customization, globalization, and localization.

The schedule view has two different UIs. They are:

  • Mobile: Displays the month, week, and date header.
  • Web: Displays the appointments alone.
Schedule view in web and Mobile
Schedule view in web and Mobile

In this blog post, I will explain the key features of the schedule view in the Calendar widget. If you are new to the Calendar widget, please go through the Getting Started article in the Calendar documentation before proceeding.

Let’s explore!

Appointment item height

You can customize the height of an appointment in the schedule view by setting an appropriate value to the appointmentItemHeight property from the ScheduleViewSettings of the Calendar widget.

Refer to the following code example.

@override
  Widget build(BuildContext context) {
    return Container(
      child: SfCalendar(
        view: CalendarView.schedule,
        scheduleViewSettings: ScheduleViewSettings(
          appointmentItemHeight: 70,
        ),
      ),
    );
  } 
  
Customized Appointment Height in Schedule View
Customized Appointment Height in Schedule View

Hide empty weeks

You can hide the weeks that don’t have any appointments in them in the schedule view by setting the value true to the hideEmptyScheduleWeek property available in the scheduleViewSettings .

Refer to the following code example.

@override
  Widget build(BuildContext context) {
    return Container(
      child: SfCalendar(
        view: CalendarView.schedule,
        scheduleViewSettings: ScheduleViewSettings(
          hideEmptyScheduleWeek: true,
        ),
      ),
    );
  }
Hiding Empty Weeks in Schedule View
Hiding Empty Weeks in Schedule View

Customization

To provide a uniform and consistent look, the schedule view allows you to customize all its headers, appointment text style, and date and day formats.

Let’s see them with an appropriate code example!

Appointment text customization

The appointment text style of the schedule view can be customized by setting the appropriate text style to the appointmentTextStyle property available in scheduleViewSettings.

Refer the following code example.

@override
  Widget build(BuildContext context) {
    return Container(
      child: SfCalendar(
        view: CalendarView.schedule,
        scheduleViewSettings: ScheduleViewSettings(
            appointmentTextStyle: TextStyle(
                fontSize: 12, fontWeight: FontWeight.w500, color: Colors.lime)),
      ),
    );
  }
Appointment Text Style Customization in Schedule View
Appointment Text Style Customization in Schedule View

Day header customization

The day header is the one that displays the date and day of the appointments on the left side of the view. This will be displayed only when the date has an appointment on it.

To provide a consistent look and format, you can customize the day header using the properties available in the dayHeaderSettings property available in the scheduleViewSettings.

The DayHeaderSettings class contains the properties that allow you to customize the features. This can be done by setting appropriate values to the dayFormat, width, dayTextStyle, and dateTextStyle in DayHeaderSettings.

Refer to the following code example.

@override
  Widget build(BuildContext context) {
    return Container(
      child: SfCalendar(
        view: CalendarView.schedule,
        scheduleViewSettings: ScheduleViewSettings(
            dayHeaderSettings: DayHeaderSettings(
                dayFormat: 'EEEE',
                width: 70,
                dayTextStyle: TextStyle(
                  fontSize: 10,
                  fontWeight: FontWeight.w300,
                  color: Colors.red,
                ),
                dateTextStyle: TextStyle(
                  fontSize: 20,
                  fontWeight: FontWeight.w300,
                  color: Colors.red,
                ))),
      ),
    );
  }
Day Header Customization in Schedule View
Day Header Customization in Schedule View

Week header customization

The week header is the one that displays the first and last date of the week at the start of a week in the schedule view.

To provide a consistent look and format, you can customize the week header using the properties available in the weekHeaderSettings property in the scheduleViewSettings. This can be done by setting appropriate values to the startDateFormat, endDateFormat, height, textAlign, backgroundColor, and weekTextStyle of WeekHeaderSettings.

Refer to the following code example.

@override
  Widget build(BuildContext context) {
    return Container(
      child: SfCalendar(
        view: CalendarView.schedule,
        scheduleViewSettings: ScheduleViewSettings(
            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,
                ))),
      ),
    );
  }
Week Header Customization in Schedule View
Week Header Customization in Schedule View

Month header customization

A month header is the one that displays the month and year at the start of a new month in the schedule view.

To provide a consistent look and feel, you can customize the month header through the properties available in the monthHeaderSettings property available in the scheduleViewSettings. This can be done by setting appropriate value to the monthFormat, height, textAlign, backgroundColor, and monthTextStyle of MonthHeaderSettings.

Refer to the following code example.

@override
  Widget build(BuildContext context) {
    return Container(
      child: SfCalendar(
        view: CalendarView.schedule,
        scheduleViewSettings: ScheduleViewSettings(
            monthHeaderSettings: MonthHeaderSettings(
                monthFormat: 'MMMM, yyyy',
                height: 100,
                textAlign: TextAlign.left,
                backgroundColor: Colors.green,
                monthTextStyle: TextStyle(
                    color: Colors.red,
                    fontSize: 25,
                    fontWeight: FontWeight.w400))),
      ),
    );
  }
Month Header Customization in Schedule View
Month Header Customization in Schedule View

Conclusion

In this blog post, we had a quick overview of the key features of the newly introduced schedule view in the Flutter Calendar. This feature is available from the Essential Studio 2020 Volume 2 release onwards. Enjoy these user-friendly, custom features and elegantly schedule your appointments.

You can explore other features in the Calendar widget’s documentation, where you can find detailed explanations of each feature with code examples.

Please feel free to try out the samples available in our GitHub location, and share your feedback or ask questions in the comments section. You can also contact us through our support forumDirect-Trac, or feedback portal. We are always happy to assist you.

googleplay.png

Related Blogs

If you liked this article, then we think you would also like the following articles:

Tags:

Share this post:

Comments (4)

Is it possible to have a multiple lines appointment text (maxLines parameter inside Appointment class)? If not, will it be added in further updates? Also, it will be useful to have an overflow parameter.

Nijamudeen Mohamed
Nijamudeen Mohamed

Hi @Adilet,

As of now, we don’t have support for multiple lines support in ScheduleView appointments. We have planned to provide a custom widget for this appointment widget. So that you can add your own widget instead of this default appointment widget. It will be available on or before vol 4, 2020 release which is expected by the end of December.

Can we disable swipe action that changes dates in scheduleview.day

Hi Ankit,

Based on the provided information, we have checked and your requirement to `Enable/Disable the swiping interaction in the Flutter calendar`. We have already logged the feature request for the same. We will implement this feature in our upcoming 2021 Volume 1 release, which is expected to be rolled out by mid of March 2021. We appreciate your patience until then.

Now you can track the current status of this feature request by using the below feedback link.

Feedback link: https://www.syncfusion.com/feedback/20195/providing-a-support-for-enable-disable-swiping-interaction-in-the-flutter-event

Comments are closed.

Popular Now

Be the first to get updates

Subscribe RSS feed

Be the first to get updates

Subscribe RSS feed