ArcaneTimeField constructor

const ArcaneTimeField({
  1. Key? key,
  2. PromptMode mode = PromptMode.popover,
  3. ValueChanged<TimeOfDay?>? onChanged,
  4. AlignmentGeometry? popoverAlignment,
  5. AlignmentGeometry? popoverAnchorAlignment,
  6. EdgeInsetsGeometry? popoverPadding,
  7. bool? use24HourFormat,
  8. bool showSeconds = false,
  9. Widget? dialogTitle,
})

Constructs an ArcaneTimeField instance with the provided configuration parameters.

This const constructor initializes the widget for efficient rebuilding in Flutter. All popover-related parameters (popoverAlignment, popoverAnchorAlignment, popoverPadding) apply only in PromptMode.popover and allow precise control over the overlay's placement and spacing relative to the ArcaneFieldWrapper. The use24HourFormat and showSeconds fields customize the time input's format and granularity for user preferences. dialogTitle is exclusively used in PromptMode.dialog to set a header widget for better context. The widget automatically retrieves and updates the form value via the associated ArcaneField<DateTime> provider, ensuring seamless integration without manual state management.

Parameters include defaults for common use cases, promoting consistency in Arcane forms. For example, setting mode to PromptMode.dialog is ideal for mobile where full-screen input improves accuracy.

Implementation

const ArcaneTimeField(
    {super.key,
    this.mode = PromptMode.popover,
    this.onChanged,
    this.popoverAlignment,
    this.popoverAnchorAlignment,
    this.popoverPadding,
    this.use24HourFormat,
    this.showSeconds = false,
    this.dialogTitle});