pub struct DateRangePickerDialog {Show 23 fields
pub key: Option<KeyRef>,
pub initial_date_range: Option<DateTimeRange>,
pub first_date: DateTime,
pub last_date: DateTime,
pub current_date_value: Option<DateTime>,
pub initial_entry_mode: DatePickerEntryMode,
pub cancel_text: Option<String>,
pub confirm_text: Option<String>,
pub save_text: Option<String>,
pub help_text: Option<String>,
pub error_invalid_range_text: Option<String>,
pub error_format_text: Option<String>,
pub error_invalid_text: Option<String>,
pub field_start_hint_text: Option<String>,
pub field_end_hint_text: Option<String>,
pub field_start_label_text: Option<String>,
pub field_end_label_text: Option<String>,
pub keyboard_type: TextInputType,
pub restoration_id: Option<String>,
pub switch_to_input_entry_mode_icon: Option<WidgetRef>,
pub switch_to_calendar_entry_mode_icon: Option<WidgetRef>,
pub selectable_day_predicate: Option<SelectableDayForRangePredicate>,
pub calendar_delegate: Rc<dyn CalendarDelegate>,
}Expand description
A Material-style date range picker dialog.
It is used by ShowDateRangePicker, which should usually be used rather than
creating a DateRangePickerDialog directly.
Fields§
§key: Option<KeyRef>§initial_date_range: Option<DateTimeRange>The date range that the date range picker starts with when it opens.
If an initial date range is provided, DateTimeRange::start and DateTimeRange::end
must both fall within the first_date and
last_date range.
first_date: DateTimeThe earliest allowable date on the date range.
last_date: DateTimeThe latest allowable date on the date range.
current_date_value: Option<DateTime>The current_date value given, if any; the getter truncates it.
initial_entry_mode: DatePickerEntryModeThe initial mode of date entry method for the date range picker dialog.
cancel_text: Option<String>The label on the cancel button for the text input mode.
confirm_text: Option<String>The label on the “OK” button for the text input mode.
save_text: Option<String>The label on the save button for the fullscreen calendar mode.
help_text: Option<String>The label displayed at the top of the dialog.
error_invalid_range_text: Option<String>Error text used to indicate the entered date range is invalid.
error_format_text: Option<String>Error text used to indicate the entered date format is invalid.
error_invalid_text: Option<String>Error text used to indicate that an entered date is outside the allowed range.
field_start_hint_text: Option<String>Hint text shown when the start date field is empty.
field_end_hint_text: Option<String>Hint text shown when the end date field is empty.
field_start_label_text: Option<String>Label used for the start date input field in the input mode.
field_end_label_text: Option<String>Label used for the end date input field in the input mode.
keyboard_type: TextInputTypeThe keyboard type of the date fields.
restoration_id: Option<String>Restoration ID to save and restore the state of the DateRangePickerDialog.
switch_to_input_entry_mode_icon: Option<WidgetRef>An optional icon that, when pressed, switches from the calendar to the text input.
switch_to_calendar_entry_mode_icon: Option<WidgetRef>An optional icon that, when pressed, switches from the text input to the calendar.
selectable_day_predicate: Option<SelectableDayForRangePredicate>Function to provide full control over which DateTime can be selected.
calendar_delegate: Rc<dyn CalendarDelegate>The calendar the dialog works in.
Implementations§
Source§impl DateRangePickerDialog
impl DateRangePickerDialog
Sourcepub fn new(first_date: DateTime, last_date: DateTime) -> DateRangePickerDialog
pub fn new(first_date: DateTime, last_date: DateTime) -> DateRangePickerDialog
Creates a DateRangePickerDialog. Dart’s optional named arguments are the fluent
setters.
Sourcepub fn current_date(&self, app: &App) -> DateTime
pub fn current_date(&self, app: &App) -> DateTime
The DateTime representing today. It will be highlighted in the day grid.
Sourcepub fn key(self, key: KeyRef) -> DateRangePickerDialog
pub fn key(self, key: KeyRef) -> DateRangePickerDialog
Dart DateRangePickerDialog(key:).
Sourcepub fn initial_date_range(
self,
initial_date_range: DateTimeRange,
) -> DateRangePickerDialog
pub fn initial_date_range( self, initial_date_range: DateTimeRange, ) -> DateRangePickerDialog
Dart DateRangePickerDialog(initialDateRange:).
Sourcepub fn with_current_date(self, current_date: DateTime) -> DateRangePickerDialog
pub fn with_current_date(self, current_date: DateTime) -> DateRangePickerDialog
Dart DateRangePickerDialog(currentDate:).
Sourcepub fn initial_entry_mode(
self,
initial_entry_mode: DatePickerEntryMode,
) -> DateRangePickerDialog
pub fn initial_entry_mode( self, initial_entry_mode: DatePickerEntryMode, ) -> DateRangePickerDialog
Dart DateRangePickerDialog(initialEntryMode:).
Sourcepub fn keyboard_type(
self,
keyboard_type: TextInputType,
) -> DateRangePickerDialog
pub fn keyboard_type( self, keyboard_type: TextInputType, ) -> DateRangePickerDialog
Dart DateRangePickerDialog(keyboardType:).
Sourcepub fn restoration_id(
self,
restoration_id: impl Into<String>,
) -> DateRangePickerDialog
pub fn restoration_id( self, restoration_id: impl Into<String>, ) -> DateRangePickerDialog
Dart DateRangePickerDialog(restorationId:).
Sourcepub fn selectable_day_predicate(
self,
selectable_day_predicate: SelectableDayForRangePredicate,
) -> DateRangePickerDialog
pub fn selectable_day_predicate( self, selectable_day_predicate: SelectableDayForRangePredicate, ) -> DateRangePickerDialog
Dart DateRangePickerDialog(selectableDayPredicate:).
Sourcepub fn calendar_delegate(
self,
calendar_delegate: Rc<dyn CalendarDelegate>,
) -> DateRangePickerDialog
pub fn calendar_delegate( self, calendar_delegate: Rc<dyn CalendarDelegate>, ) -> DateRangePickerDialog
Dart DateRangePickerDialog(calendarDelegate:).
Trait Implementations§
Source§impl Clone for DateRangePickerDialog
impl Clone for DateRangePickerDialog
Source§impl Debug for DateRangePickerDialog
impl Debug for DateRangePickerDialog
Source§impl StatefulWidget for DateRangePickerDialog
impl StatefulWidget for DateRangePickerDialog
Source§type State = DateRangePickerDialogState
type State = DateRangePickerDialogState
Source§fn create_state(&self) -> DateRangePickerDialogState
fn create_state(&self) -> DateRangePickerDialogState
Source§fn debug_fill_properties(
&self,
_app: &App,
properties: &mut DiagnosticPropertiesBuilder,
)
fn debug_fill_properties( &self, _app: &App, properties: &mut DiagnosticPropertiesBuilder, )
debugFillProperties: the properties a dump shows for this widget, in Dart’s
order. Dart’s Widget base only sets the dense tree style, which the framework does.Source§fn as_preferred_size_widget(
&self,
) -> Option<&(dyn PreferredSizeWidget + 'static)>
fn as_preferred_size_widget( &self, ) -> Option<&(dyn PreferredSizeWidget + 'static)>
Source§fn type_name(&self) -> &'static str
fn type_name(&self) -> &'static str
Widget::type_name. A stateful form another widget kind becomes (an animated or
status transition widget) names the widget it wraps.Auto Trait Implementations§
impl !RefUnwindSafe for DateRangePickerDialog
impl !Send for DateRangePickerDialog
impl !Sync for DateRangePickerDialog
impl !UnwindSafe for DateRangePickerDialog
impl Forget for DateRangePickerDialog
impl Freeze for DateRangePickerDialogwhere
*const RcInner<dyn Key> is !null: Freeze,
PhantomData<RcInner<dyn Key>>: Freeze,
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
*const RcInner<dyn Widget> is !null: Freeze,
PhantomData<RcInner<dyn Widget>>: Freeze,
*const RcInner<dyn Fn(&App, DateTime, Option<DateTime>, Option<DateTime>) -> bool> is !null: Freeze,
PhantomData<RcInner<dyn Fn(&App, DateTime, Option<DateTime>, Option<DateTime>) -> bool>>: Freeze,
*const RcInner<dyn CalendarDelegate> is !null: Freeze,
PhantomData<RcInner<dyn CalendarDelegate>>: Freeze,
impl Move for DateRangePickerDialog
impl Unpin for DateRangePickerDialog
impl UnsafeUnpin for DateRangePickerDialogwhere
*const RcInner<dyn Key> is !null: UnsafeUnpin,
PhantomData<RcInner<dyn Key>>: UnsafeUnpin,
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
*const RcInner<dyn Widget> is !null: UnsafeUnpin,
PhantomData<RcInner<dyn Widget>>: UnsafeUnpin,
*const RcInner<dyn Fn(&App, DateTime, Option<DateTime>, Option<DateTime>) -> bool> is !null: UnsafeUnpin,
PhantomData<RcInner<dyn Fn(&App, DateTime, Option<DateTime>, Option<DateTime>) -> bool>>: UnsafeUnpin,
*const RcInner<dyn CalendarDelegate> is !null: UnsafeUnpin,
PhantomData<RcInner<dyn CalendarDelegate>>: UnsafeUnpin,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<W> IntoWidget<StatefulKind> for Wwhere
W: StatefulWidget,
impl<W> IntoWidget<StatefulKind> for Wwhere
W: StatefulWidget,
Source§fn into_widget(self) -> Rc<dyn Widget>
fn into_widget(self) -> Rc<dyn Widget>
creation_location.