|
| 1 | +## **Customise theme** |
| 2 | +The default theme supports dark mode. Refer this colors to override it. |
| 3 | + |
| 4 | +| Name | Parameter | Default color | |
| 5 | +|-----------------------------------------------|------------------------|-------------------------------------| |
| 6 | +| `MonthView` Border color | Color? borderColor | colorScheme.surfaceContainerHigh | |
| 7 | +| `WeekView` Background color of week view page | Color? backgroundColor | colorScheme.surfaceContainerLowest | |
| 8 | +| `DayView` Default background color | Color? backgroundColor | colorScheme.surfaceContainerLow | |
| 9 | +| `FilledCell` Dates in month cell color | Color? backgroundColor | colorScheme.surfaceContainerLowest | |
| 10 | +| `FilledCell` Dates not in month cell color | Color? backgroundColor | colorScheme.surfaceContainerLow | |
| 11 | +| `WeekDayTile` Border color | Color? borderColor | colorScheme.secondaryContainer | |
| 12 | +| `WeekDayTile` Background color | Color? backgroundColor | colorScheme.surfaceContainerHigh | |
| 13 | +| `WeekDayTile` Text style color | TextStyle? textStyle | colorScheme.onSecondaryContainer | |
| 14 | + |
| 15 | +To customise `MonthView`, `DayView` & `WeekView` page header use `HeaderStyle`. |
| 16 | + |
| 17 | +```dart |
| 18 | + headerStyle: HeaderStyle( |
| 19 | + leftIconConfig: IconDataConfig(color: Colors.red), |
| 20 | + rightIconConfig: IconDataConfig(color: Colors.red), |
| 21 | + decoration: BoxDecoration( |
| 22 | + color: Theme.of(context).highlightColor, |
| 23 | + ), |
| 24 | + ), |
| 25 | +``` |
| 26 | + |
| 27 | +### Day view |
| 28 | +* Default timeline text color is `colorScheme.onSurface`. |
| 29 | + * Use `markingStyle` in `DefaultTimeLineMark` to give text style. |
| 30 | +* Default `LiveTimeIndicatorSettings` color `colorScheme.primaryColorLight`. |
| 31 | + * Use `liveTimeIndicatorSettings` to customise it. |
| 32 | +* Default hour, half hour & quarter color is `colorScheme.surfaceContainerHighest`. |
| 33 | + * Use `hourIndicatorSettings` to customise it. |
| 34 | + |
| 35 | +Default hour indicator settings. |
| 36 | +```dart |
| 37 | + HourIndicatorSettings( |
| 38 | + height: widget.heightPerMinute, |
| 39 | + // Color of horizontal and vertical lines |
| 40 | + color: Theme.of(context).colorScheme.surfaceContainerHighest, |
| 41 | + offset: 5, |
| 42 | + ); |
| 43 | +``` |
| 44 | + |
| 45 | +### Week view |
| 46 | +* To customise week number & weekdays use `weekNumberBuilder` & `weekDayBuilder`. |
| 47 | +* Default week tile background color is `colorScheme.surfaceContainerHigh`. |
| 48 | + * Use `weekTitleBackgroundColor` to change background color. |
| 49 | +* Default page background color is `colorScheme.surfaceContainerLowest`. |
| 50 | + * Use `backgroundColor` to change background color. |
| 51 | +* Default timeline text color is `colorScheme.onSurface`. Use `markingStyle` in `DefaultTimeLineMark` to give text style. |
| 52 | + * To customise timeline use `timeLineBuilder`. |
| 53 | +* To change Hour lines color use `HourIndicatorSettings`. |
| 54 | +* To style hours, half hours & quarter hours use `HourIndicatorSettings`. Default color used is `surfaceContainerHighest` |
| 55 | + |
| 56 | +```dart |
| 57 | + hourIndicatorSettings: HourIndicatorSettings( |
| 58 | + color: Colors.greenAccent, |
| 59 | + lineStyle: LineStyle.dashed, |
| 60 | + ), |
| 61 | + showHalfHours: true, |
| 62 | + halfHourIndicatorSettings: HourIndicatorSettings( |
| 63 | + color: Colors.redAccent, |
| 64 | + lineStyle: LineStyle.dashed, |
| 65 | + ), |
| 66 | +``` |
0 commit comments