ArcaneTimeField constructor
- Key? key,
- PromptMode mode = PromptMode.popover,
- ValueChanged<
TimeOfDay?> ? onChanged, - AlignmentGeometry? popoverAlignment,
- AlignmentGeometry? popoverAnchorAlignment,
- EdgeInsetsGeometry? popoverPadding,
- bool? use24HourFormat,
- bool showSeconds = false,
- 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});