selectionDecoration property
The decoration for the selection cells in SfCalendar.
Defaults to null.
Using a SfCalendarTheme
gives more fine-grained control over the
appearance of various components of the calendar.
See also:
- initialSelectedDate, to select date when calendar displays initially
- CalendarController.selectedDate, to select date programmatically in calendar in the runtime.
SfCalendarTheme
, to handle theming with calendar for giving consistent look.- Knowledge base: How to customize the selection using decoration
Widget build(BuildContext context) {
return Container(
child: SfCalendar(
view: CalendarView.month,
selectionDecoration: BoxDecoration(
color: Colors.transparent,
border:
Border.all(color: const Color.fromARGB(255, 68, 140, 255),
width: 2),
borderRadius: const BorderRadius.all(Radius.circular(4)),
shape: BoxShape.rectangle,
),
),
);
}
Implementation
final Decoration? selectionDecoration;