@@ -70,9 +70,15 @@ class DaysPicker extends StatefulWidget {
7070 this .splashColor,
7171 this .splashRadius,
7272 this .centerLeadingDate = false ,
73- this .previousPageSemanticLabel = 'Previous Day' ,
74- this .nextPageSemanticLabel = 'Next Day' ,
73+ this .previousPageSemanticLabel,
74+ this .nextPageSemanticLabel,
7575 this .disabledDayPredicate,
76+ this .forwardButtonDecoration = const BoxDecoration (),
77+ this .forwardButtonSplashColor = Colors .transparent,
78+ this .forwardButtonHighlightColor = Colors .transparent,
79+ this .backwardButtonDecoration = const BoxDecoration (),
80+ this .backwardButtonSplashColor = Colors .transparent,
81+ this .backwardButtonHighlightColor = Colors .transparent,
7682 }) {
7783 assert (! minDate.isAfter (maxDate), "minDate can't be after maxDate" );
7884 assert (
@@ -236,6 +242,36 @@ class DaysPicker extends StatefulWidget {
236242 /// A predicate function used to determine if a given day should be disabled.
237243 final DatePredicate ? disabledDayPredicate;
238244
245+ /// The cell decoration of the forward button.
246+ ///
247+ /// defaults to empty [BoxDecoration] .
248+ final BoxDecoration forwardButtonDecoration;
249+
250+ /// The splash color of the ink response when pressed.
251+ ///
252+ /// defaults to [Colors.transparent] .
253+ final Color forwardButtonSplashColor;
254+
255+ /// The highlight color of the ink response when pressed.
256+ ///
257+ /// defaults to [Colors.transparent] .
258+ final Color forwardButtonHighlightColor;
259+
260+ /// The cell decoration of the backward button.
261+ ///
262+ /// defaults to empty [BoxDecoration] .
263+ final BoxDecoration backwardButtonDecoration;
264+
265+ /// The splash color of the ink response when pressed.
266+ ///
267+ /// defaults to [Colors.transparent] .
268+ final Color backwardButtonSplashColor;
269+
270+ /// The highlight color of the ink response when pressed.
271+ ///
272+ /// defaults to [Colors.transparent] .
273+ final Color backwardButtonHighlightColor;
274+
239275 @override
240276 State <DaysPicker > createState () => _DaysPickerState ();
241277}
@@ -410,6 +446,15 @@ class _DaysPickerState extends State<DaysPicker> {
410446 mainAxisSize: MainAxisSize .min,
411447 children: [
412448 Header (
449+ forwardButtonDecoration: widget.forwardButtonDecoration,
450+ forwardButtonSplashColor: widget.forwardButtonSplashColor,
451+ forwardButtonHighlightColor: widget.forwardButtonHighlightColor,
452+ backwardButtonDecoration: widget.backwardButtonDecoration,
453+ backwardButtonSplashColor: widget.backwardButtonSplashColor,
454+ backwardButtonHighlightColor: widget.forwardButtonHighlightColor,
455+ previousPageSemanticLabel:
456+ widget.previousPageSemanticLabel ?? MaterialLocalizations .of (context).previousPageTooltip,
457+ nextPageSemanticLabel: widget.nextPageSemanticLabel ?? MaterialLocalizations .of (context).nextPageTooltip,
413458 centerLeadingDate: widget.centerLeadingDate,
414459 leadingDateTextStyle: leadingDateTextStyle,
415460 slidersColor: slidersColor,
@@ -439,8 +484,6 @@ class _DaysPickerState extends State<DaysPicker> {
439484 curve: Curves .ease,
440485 );
441486 },
442- previousPageSemanticLabel: widget.previousPageSemanticLabel,
443- nextPageSemanticLabel: widget.nextPageSemanticLabel,
444487 ),
445488 const SizedBox (height: 10 ),
446489 Expanded (
0 commit comments