DatePicker constructor

DatePicker({
  1. int? maxlength,
  2. Widget? dateIcon,
  3. double? width,
  4. String? labelText,
  5. bool? enabled = true,
  6. String? initialValue,
  7. String? hintText,
  8. String? validator(
    1. String?
    )?,
  9. dynamic onChanged(
    1. DateTime? value
    )?,
  10. required TextEditingController? dateController,
  11. String? format = 'yyyy-MM-dd',
  12. DateTime? startDate,
  13. DateTime? lastDate,
  14. required DateTime? selectedValue,
})

Implementation

DatePicker(
    {this.maxlength,
    this.dateIcon,
    this.width,
    this.labelText,
    this.enabled = true,
    this.initialValue,
    this.hintText,
    this.validator,
    this.onChanged,
    required this.dateController,
    this.format = 'yyyy-MM-dd',
    this.startDate,
    this.lastDate,
    required this.selectedValue}) {
  if (this.selectedValue == null) {
    this.selectedValue = DateTime.now();
  }
}