Skip to content

Commit e409a0b

Browse files
committed
Remove deprecation for initialTime & initialDate in DateTimePicker
1 parent 72af06c commit e409a0b

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

lib/src/fields/form_builder_date_time_picker.dart

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,6 @@ class FormBuilderDateTimePicker extends StatefulWidget {
3232
/// The date the calendar opens to when displayed. Defaults to the current date.
3333
///
3434
/// To preset the widget's value, use [initialValue] instead.
35-
@Deprecated(
36-
"This field will be removed in version 4.0.0. Selected date or Current date will be used on DatePicker calendar instead")
3735
final DateTime initialDate;
3836

3937
/// The earliest choosable date. Defaults to 1900.
@@ -44,8 +42,6 @@ class FormBuilderDateTimePicker extends StatefulWidget {
4442

4543
/// The initial time prefilled in the picker dialog when it is shown. Defaults
4644
/// to noon. Explicitly set this to `null` to use the current time.
47-
@Deprecated(
48-
"This field will be removed in the next major version. Selected time or current time will be used on TimePicker instead")
4945
final TimeOfDay initialTime;
5046

5147
/// If defined, the TextField [decoration]'s [suffixIcon] will be
@@ -363,7 +359,6 @@ class _FormBuilderDateTimePickerState extends State<FormBuilderDateTimePicker> {
363359
selectableDayPredicate: widget.selectableDayPredicate,
364360
initialDatePickerMode:
365361
widget.initialDatePickerMode ?? DatePickerMode.day,
366-
// ignore: deprecated_member_use_from_same_package
367362
initialDate: currentValue ?? widget.initialDate ?? DateTime.now(),
368363
firstDate: widget.firstDate ?? DateTime(1900),
369364
lastDate: widget.lastDate ?? DateTime(2100),
@@ -382,10 +377,8 @@ class _FormBuilderDateTimePickerState extends State<FormBuilderDateTimePicker> {
382377
} else {
383378
return showTimePicker(
384379
context: context,
385-
// initialTime: widget.initialTime ?? TimeOfDay.fromDateTime(currentValue ?? DateTime.now()),
386380
initialTime: currentValue != null
387381
? TimeOfDay.fromDateTime(currentValue)
388-
// ignore: deprecated_member_use_from_same_package
389382
: widget.initialTime ?? TimeOfDay.fromDateTime(DateTime.now()),
390383
builder: widget.builder,
391384
useRootNavigator: widget.useRootNavigator,

0 commit comments

Comments
 (0)