ResourceViewSettings constructor
Creates resource view settings for SfCalendar.
Use this to customize the size, layout, and appearance of the resource view.
size — Sets both the resource panel width and each resource item's height.
Defaults to 75.
height — Sets the height for each resource item when given explicitly.
Ignored when visibleResourceCount > 0. Falls back to size when null.
width — Sets the width for the resource panel when given explicitly.
Falls back to size when null.
visibleResourceCount — When greater than 0, splits the available
vertical space equally among visible resources, overriding both height
and size.
showAvatar — Indicates whether a circular avatar is shown for each
resource. Defaults to true.
displayNameTextStyle — Text style used for the display name of each
resource.
Behavior and precedence
- If
heightorwidthis provided, the provided value is used. - If neither is provided,
sizeis used for both dimensions. - When
visibleResourceCount> 0, it takes precedence for resource item height over bothheightandsize.
Implementation
const ResourceViewSettings({
this.size = 75,
this.visibleResourceCount = -1,
this.showAvatar = true,
this.displayNameTextStyle,
this.height,
double? width,
}) : width = width ?? size,
assert(size >= 0),
assert(visibleResourceCount >= -1);