What’s New in 2020 Volume 3: Flutter Event Calendar | Syncfusion Blogs
Live Chat Icon For mobile
Live Chat Icon
Popular Categories.NET  (172).NET Core  (29).NET MAUI  (192)Angular  (107)ASP.NET  (51)ASP.NET Core  (82)ASP.NET MVC  (89)Azure  (40)Black Friday Deal  (1)Blazor  (209)BoldSign  (12)DocIO  (24)Essential JS 2  (106)Essential Studio  (200)File Formats  (63)Flutter  (131)JavaScript  (219)Microsoft  (118)PDF  (80)Python  (1)React  (98)Streamlit  (1)Succinctly series  (131)Syncfusion  (882)TypeScript  (33)Uno Platform  (3)UWP  (4)Vue  (45)Webinar  (49)Windows Forms  (61)WinUI  (68)WPF  (157)Xamarin  (161)XlsIO  (35)Other CategoriesBarcode  (5)BI  (29)Bold BI  (8)Bold Reports  (2)Build conference  (8)Business intelligence  (55)Button  (4)C#  (146)Chart  (125)Cloud  (15)Company  (443)Dashboard  (8)Data Science  (3)Data Validation  (8)DataGrid  (62)Development  (613)Doc  (7)DockingManager  (1)eBook  (99)Enterprise  (22)Entity Framework  (5)Essential Tools  (14)Excel  (37)Extensions  (22)File Manager  (6)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  (488)Mobile MVC  (9)OLAP server  (1)Open source  (1)Orubase  (12)Partners  (21)PDF viewer  (41)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  (10)Stock Chart  (1)Surface  (4)Tablets  (5)Theme  (12)Tips and Tricks  (112)UI  (368)Uncategorized  (68)Unix  (2)User interface  (68)Visual State Manager  (2)Visual Studio  (30)Visual Studio Code  (17)Web  (577)What's new  (313)Windows 8  (19)Windows App  (2)Windows Phone  (15)Windows Phone 7  (9)WinRT  (26)
What’s New in 2020 Volume 3: Flutter Event Calendar

What’s New in 2020 Volume 3: Flutter Event Calendar

Our last release included some impressive features in the Calendar widget, such as a schedule view and special time region. Now, Syncfusion is pleased to announce the availability of several important enhancements in the Flutter event calendar in our Essential Studio 2020 Volume 3 release. Here are the new features included:

Timeline month view

This feature in the Flutter event calendar is used to display appointments across multiple days of a month on a horizontal axis where each column represents a single day.

Refer to the following code.

 
return SfCalendar (
      view: CalendarView.timelineMonth,
    );
Timeline month view
Timeline month view

Blackout dates

This feature in the Flutter event calendar is used to disable any date in a month or timeline month view of a calendar to make it inactive. It restricts the user interaction on these dates. You can customize the style of the blackout dates using the blackoutDatesTextStyle property available in the Calendar.

Here, the dates 10, 15, 20, 22, and 24 of August 2020 are marked as blackout dates to restrict user interactions in them. Refer to the following code.

 
return SfCalendar(
      view: CalendarView.month,
      blackoutDates: <DateTime>[
        DateTime(2020, 08, 10),
        DateTime(2020, 08, 15),
        DateTime(2020, 08, 20),
        DateTime(2020, 08, 22),
        DateTime(2020, 08, 24)
      ],
      blackoutDatesTextStyle: TextStyle(
          fontWeight: FontWeight.w400,
          fontSize: 13,
          color: Colors.red,
          decoration: TextDecoration.lineThrough)
    );
Blackout dates
Blackout dates

Hide leading and trailing dates

This feature in the Calendar widget allows you to hide the previous and next months’ dates in the month view to enhance its appearance and display of the current month’s dates in the month view.

Refer to the following code.

 
return SfCalendar(
        view: CalendarView.month,
        monthViewSettings: MonthViewSettings(
          showTrailingAndLeadingDates: false,
        ));
Hide leading and trailing dates
Hide leading and trailing dates

Custom agenda appointment time format

You can customize the display format of time in each appointment in the month agenda view and schedule view of the Flutter Calendar widget. This can be done by specifying values to the appointmentTimeTextFormat property of the Calendar.

Refer to the following code.

 
return SfCalendar(
      view: CalendarView.month,
      dataSource: _calendarDataSource,
      appointmentTimeTextFormat: 'HH:mm',
      monthViewSettings: MonthViewSettings(
        showAgenda: true
      ),
    );
Custom agenda appointment time format
Custom agenda appointment time format

Quick view navigation

Navigate among calendar views easily. With the header-date picker, quick navigation is provided in the month view when clicking on a month cell. Also, buttons for easy navigation for day, week, workweek and month views are available in the view headers.

Refer to the following code.

 
return SfCalendar(
      view: CalendarView.month,
      allowViewNavigation: true,
      showDatePickerButton: true,
      allowedViews: <CalendarView>
    [
       CalendarView.day,
       CalendarView.week,
       CalendarView.workWeek,
       CalendarView.month, 
     ]
  );
Quick view navigation
Quick view navigation

Custom builder support

This feature allows you to design and create your own custom view for the month cells and month header for the schedule view in the Flutter event calendar.

Month cell builder

You can design your own custom view for a month cell by customizing the monthCellBuilder property of the Calendar.

Refer to the following code.

 
return SfCalendar(
        view: CalendarView.month,
        monthCellBuilder:
            (BuildContext buildContext, MonthCellDetails details) {
          final Color backgroundColor =
              _getMonthCellBackgroundColor(details.date);
          final Color defaultColor = model.themeData != null &&
                  model.themeData.brightness == Brightness.dark
              ? Colors.black54
              : Colors.white;
          return Container(
            decoration: BoxDecoration(
                color: backgroundColor,
                border: Border.all(color: defaultColor, width: 0.5)),
            child: Center(
              child: Text(
                details.date.day.toString(),
                style: TextStyle(color: _getCellTextColor(backgroundColor)),
              ),
            ),
          );
        },
        showDatePickerButton: true,
        monthViewSettings: MonthViewSettings(
          showTrailingAndLeadingDates: false,
        ));
Custom view for the month cell builder
Custom view for the month cell builder

Schedule view month header builder

You can design your own custom view for the month header in the schedule view by customizing the scheduleViewMonthHeaderBuilder property in the Calendar.

Refer to the following code.

 
return SfCalendar(
        view: CalendarView.schedule,
        dataSource: _calendarDataSource,
        scheduleViewMonthHeaderBuilder: (BuildContext buildContext,
            ScheduleViewMonthHeaderDetails details) {
          final String monthName = _getMonthDate(details.date.month);
          return Stack(
            children: [
              Image(
                  image: ExactAssetImage('images/' + monthName + '.png'),
                  fit: BoxFit.cover,
                  width: details.bounds.width,
                  height: details.bounds.height),
              Positioned(
                left: 55,
                right: 0,
                top: 20,
                bottom: 0,
                child: Text(
                  monthName + ' ' + details.date.year.toString(),
                  style: TextStyle(fontSize: 18),
                ),
              )
            ],
          );
        },
        showDatePickerButton: true);
Schedule view month header builder
Schedule view month header builder

Conclusion

In this blog post, we walked you through the new features in our Flutter event calendar, available with our 2020 Volume 3 release. You can explore other features in the Calendar widget’s documentation, where you can find detailed explanations of each feature along with code examples.

For existing customers, the newest version of Essential Studio is available for download from the License and Downloads page. If you are not yet a Syncfusion customer, you can try our 30-day free trial to check out our available features.

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 forum, Direct-Trac, or feedback portal. We are always happy to assist you!

googleplay.png

Tags:

Share this post:

Popular Now

Be the first to get updates

Subscribe RSS feed

Be the first to get updates

Subscribe RSS feed
Scroll To Top