Skip to content

SyncfusionExamples/custom-fonts-flutter-event-calendar

Repository files navigation

How to add custom fonts in the Flutter Calendar?

A quick-start example to help you to add custom fonts in the Flutter Calendar.

Custom fonts can be added to calendar elements in the Flutter event calendar by using monthCellStyle, headerStyle, viewHeaderStyle, timeTextStyle, and ScheduleViewSettings.

Install the required fonts

Install the required custom font, create a fonts folder, and add the fonts to customise the fonts.

Specifying the fonts

The fonts must be specified in the Pubspec.yaml file. The custom font should then be applied to the calendar's monthCellStyle, headerStyle, viewHeaderStyle, timeTextStyle, ScheduleViewSettings, and appointmentTextStyle.


fonts:
    - family: Roboto
      fonts:
        - asset: fonts/Roboto-Italic.ttf
          weight: 700
    - family: SyneTactile
      fonts:
        - asset: fonts/SyneTactile-Regular.ttf
          weight: 700

For more details , refer to this KB.

Requirements to run the demo

How to run this application

To run this application, you need to first clone or download the ‘create a flutter maps widget in 10 minutes’ repository and open it in your preferred IDE. Then, build and run your project to view the output.

Further help

For more help, check the Syncfusion Flutter documentation, Flutter documentation.