File tree Expand file tree Collapse file tree 1 file changed +18
-1
lines changed Expand file tree Collapse file tree 1 file changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -106,7 +106,24 @@ class FormBuilderDateRangePicker extends StatefulWidget {
106
106
this .locale,
107
107
this .selectableDayPredicate,
108
108
this .onSaved,
109
- }) : super (key: key);
109
+ }) : assert (
110
+ initialValue == null ||
111
+ lastDate == null ||
112
+ initialValue[1 ] == null ||
113
+ initialValue[1 ].isBefore (lastDate),
114
+ 'The last date of initialValue must be on or before lastDate' ),
115
+ assert (
116
+ initialValue == null ||
117
+ firstDate == null ||
118
+ initialValue[0 ] == null ||
119
+ initialValue[0 ].isAfter (firstDate),
120
+ 'The first date of initialValue must be on or after firstDate' ),
121
+ assert (
122
+ lastDate == null ||
123
+ firstDate == null ||
124
+ lastDate.isAfter (firstDate),
125
+ 'lastDate must be on or after firstDate' ),
126
+ super (key: key);
110
127
111
128
@override
112
129
FormBuilderDateRangePickerState createState () =>
You can’t perform that action at this time.
0 commit comments