displayName property
The name which displayed on the CalendarResource view of SfCalendar.
Defaults to
.
Note: The display name text style can be customized using the ResourceViewSettings.displayNameTextStyle property.
See also:
- ResourceViewSettings.displayNameTextStyle, which allows to customize the display name text in the resource view in SfCalendar.
- Knowledge base: How to customize the resource view
DataSource _getCalendarDataSource() {
List<Appointment> appointments = <Appointment>[];
List<CalendarResource> resources = <CalendarResource>[];
appointments.add(Appointment(
startTime: DateTime.now(),
endTime: DateTime.now().add(Duration(hours: 2)),
isAllDay: true,
subject: 'Meeting',
color: Colors.blue,
resourceIds: <Object>['0001'],
startTimeZone: '',
endTimeZone: ''));
resources.add(CalendarResource(
displayName: 'John',
id: '0001',
));
return DataSource(appointments, resources);
}
Implementation
final String displayName;