FormCast.date constructor

FormCast.date({
  1. TextStyle? style,
  2. VoidCallback? onTap,
  3. FocusNode? focusNode,
  4. bool autofocus = false,
  5. bool? enableFeedback,
  6. EdgeInsetsGeometry? padding,
  7. bool hideDefaultSuffixIcon = false,
  8. DateTime? initialPickerDateTime,
  9. CupertinoDatePickerOptions? cupertinoDatePickerOptions,
  10. MaterialDatePickerOptions? materialDatePickerOptions,
  11. MaterialTimePickerOptions? materialTimePickerOptions,
  12. InputDecoration? decoration,
  13. DateFormat? dateFormat,
  14. DateTime? firstDate,
  15. DateTime? lastDate,
  16. DateTimeFieldPickerMode mode = DateTimeFieldPickerMode.date,
  17. DateTimeFieldPickerPlatform pickerPlatform = DateTimeFieldPickerPlatform.adaptive,
})

Cast to date

Implementation

FormCast.date({
  TextStyle? style,
  VoidCallback? onTap,
  FocusNode? focusNode,
  bool autofocus = false,
  bool? enableFeedback,
  EdgeInsetsGeometry? padding,
  bool hideDefaultSuffixIcon = false,
  DateTime? initialPickerDateTime,
  CupertinoDatePickerOptions? cupertinoDatePickerOptions,
  MaterialDatePickerOptions? materialDatePickerOptions,
  MaterialTimePickerOptions? materialTimePickerOptions,
  InputDecoration? decoration,
  DateFormat? dateFormat,
  DateTime? firstDate,
  DateTime? lastDate,
  DateTimeFieldPickerMode mode = DateTimeFieldPickerMode.date,
  DateTimeFieldPickerPlatform pickerPlatform =
      DateTimeFieldPickerPlatform.adaptive,
}) {
  type = "datetime";
  metaData = {};
  metaData['style'] = style;
  metaData['onTap'] = onTap;
  metaData['focusNode'] = focusNode;
  metaData['autofocus'] = autofocus;
  metaData['enableFeedback'] = enableFeedback;
  metaData['padding'] = padding;
  metaData['hideDefaultSuffixIcon'] = hideDefaultSuffixIcon;
  metaData['initialPickerDateTime'] = initialPickerDateTime;
  metaData['cupertinoDatePickerOptions'] = cupertinoDatePickerOptions;
  metaData['materialDatePickerOptions'] = materialDatePickerOptions;
  metaData['materialTimePickerOptions'] = materialTimePickerOptions;
  metaData['decoration'] = decoration;
  metaData['dateFormat'] = dateFormat;
  metaData['firstDate'] = firstDate;
  metaData['lastDate'] = lastDate;
  metaData['mode'] = mode;
  metaData['pickerPlatform'] = pickerPlatform;
}