pub struct TimePickerThemeData {Show 24 fields
pub background_color: Option<AnyColor>,
pub cancel_button_style: Option<ButtonStyle>,
pub confirm_button_style: Option<ButtonStyle>,
pub day_period_border_side: Option<BorderSide>,
pub day_period_color: Option<AnyColor>,
pub day_period_shape: Option<OutlinedBorderRef>,
pub day_period_text_color: Option<AnyColor>,
pub day_period_text_style: Option<AnyTextStyle>,
pub dial_background_color: Option<AnyColor>,
pub dial_hand_color: Option<AnyColor>,
pub dial_text_color: Option<AnyColor>,
pub dial_text_style: Option<AnyTextStyle>,
pub elevation: Option<f64>,
pub entry_mode_icon_color: Option<AnyColor>,
pub help_text_style: Option<AnyTextStyle>,
pub hour_minute_color: Option<AnyColor>,
pub hour_minute_shape: Option<ShapeBorderRef>,
pub hour_minute_text_color: Option<AnyColor>,
pub hour_minute_text_style: Option<AnyTextStyle>,
pub input_decoration_theme: Option<InputDecorationThemeData>,
pub padding: Option<EdgeInsetsGeometry>,
pub shape: Option<ShapeBorderRef>,
pub time_selector_separator_color: Option<WidgetStatePropertyRef<Option<Color>>>,
pub time_selector_separator_text_style: Option<WidgetStatePropertyRef<Option<TextStyle>>>,
}Expand description
Defines the visual properties of the widget displayed with showTimePicker.
Descendant widgets obtain the current TimePickerThemeData object using
TimePickerTheme::of. Instances of TimePickerThemeData can be customized with
TimePickerThemeData::copy_with.
Typically a TimePickerThemeData is specified as part of the overall Theme with
ThemeData::time_picker_theme.
All TimePickerThemeData properties are None by default. When null, the time picker
provides its own defaults based on the overall Theme’s ThemeData::color_scheme,
ThemeData::text_theme, and ThemeData::icon_theme.
See also:
TimePickerTheme, which describes the actual configuration of a time picker theme.ThemeData, which describes the overall theme information for the application.
Fields§
§background_color: Option<AnyColor>The background color of a time picker.
If this is null, the time picker defaults to the overall theme’s
ColorScheme::surface_container_high.
Style of the cancel button of a time picker.
If this is null, the time picker defaults to a TextButton styled with the theme’s
primary color.
Style of the confirm (OK) button of a time picker.
If this is null, the time picker defaults to a TextButton styled with the theme’s
primary color.
day_period_border_side: Option<BorderSide>The color and weight of the day period’s outline.
If this is null, the time picker defaults to
BorderSide(color: Color(0xFF79747E)).
day_period_color: Option<AnyColor>Dart’s private _dayPeriodColor: the color as it was given, before
day_period_color_getter wraps a plain color.
Keep the raw value here: the getter’s wrapped color never equals another wrapped color.
day_period_shape: Option<OutlinedBorderRef>The shape of the day period that the time picker uses.
If this is null, the time picker defaults to a RoundedRectangleBorder with a
circular corner radius of 4.0.
day_period_text_color: Option<AnyColor>The color of the day period text that represents AM/PM.
If this is null, the time picker defaults to ColorScheme::on_surface_variant when the
day period is not selected, and ColorScheme::on_tertiary_container when it is.
day_period_text_style: Option<AnyTextStyle>Used to configure the TextStyles for the day period control.
If this is null, the time picker defaults to the overall theme’s
TextTheme::title_medium.
dial_background_color: Option<AnyColor>The background color of the time picker dial when the entry mode is
TimePickerEntryMode::dial or TimePickerEntryMode::dialOnly.
If this is null and ThemeData::use_material3 is true, the time picker dial background
color defaults to ColorScheme::surface_container_highest.
dial_hand_color: Option<AnyColor>The color of the time picker dial’s hand when the entry mode is
TimePickerEntryMode::dial or TimePickerEntryMode::dialOnly.
If this is null and ThemeData::use_material3 is true, the time picker dial hand color
defaults to ColorScheme::primary.
dial_text_color: Option<AnyColor>The color of the dial text that represents specific hours and minutes.
If this is null, the time picker defaults to ColorScheme::on_surface.
dial_text_style: Option<AnyTextStyle>The TextStyle of the dial text that represents specific hours and minutes.
If this is null, the time picker defaults to the overall theme’s
TextTheme::body_large.
elevation: Option<f64>The Material elevation for the time picker dialog.
entry_mode_icon_color: Option<AnyColor>The color of the entry mode IconButton.
If this is null, the time picker defaults to ColorScheme::on_surface_variant.
help_text_style: Option<AnyTextStyle>Used to configure the TextStyle for the helper text in the header.
If this is null, the time picker defaults to the overall theme’s
TextTheme::label_medium.
hour_minute_color: Option<AnyColor>The background color of the hour and minute controls.
If this is null, the time picker defaults to ColorScheme::secondary_container.
hour_minute_shape: Option<ShapeBorderRef>The shape of the hour and minute controls that the time picker uses.
If this is null, the time picker defaults to
RoundedRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(8.0))).
hour_minute_text_color: Option<AnyColor>The color of the header text that represents hours and minutes.
If this is null, the time picker defaults to ColorScheme::on_secondary_container.
hour_minute_text_style: Option<AnyTextStyle>Used to configure the text style for the hour and minute controls.
If this is null, the time picker defaults to the overall theme’s
TextTheme::display_medium.
input_decoration_theme: Option<InputDecorationThemeData>The input decoration theme for the TextFields in the time picker.
If this is null, the time picker provides its own defaults based on the overall
theme’s ColorScheme.
padding: Option<EdgeInsetsGeometry>The padding around the time picker dialog when the entry mode is
TimePickerEntryMode::dial or TimePickerEntryMode::dialOnly.
shape: Option<ShapeBorderRef>The shape of the dialog that the time picker is presented in.
If this is null, the time picker defaults to
RoundedRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(28.0))).
time_selector_separator_color: Option<WidgetStatePropertyRef<Option<Color>>>The color of the time selector separator between the hour and minute controls.
If this is null, the time picker defaults to ColorScheme::on_surface.
time_selector_separator_text_style: Option<WidgetStatePropertyRef<Option<TextStyle>>>The text style of the time selector separator between the hour and minute controls.
If this is null, the time picker defaults to the overall theme’s
TextTheme::display_large, with the color of
time_selector_separator_color.
Implementations§
Source§impl TimePickerThemeData
impl TimePickerThemeData
Sourcepub fn new() -> TimePickerThemeData
pub fn new() -> TimePickerThemeData
Creates a theme that can be used for ThemeData::time_picker_theme.
Dart’s named arguments are the fluent setters.
Sourcepub fn day_period_color_getter(&self) -> Option<AnyColor>
pub fn day_period_color_getter(&self) -> Option<AnyColor>
Dart’s dayPeriodColor getter.
The color of the day period’s background: a WidgetStateColor that is the given color
when the day period is selected and transparent otherwise, unless the given color is
already a state color, which is returned as it is.
Sourcepub fn background_color(self, background_color: impl Into<AnyColor>) -> Self
pub fn background_color(self, background_color: impl Into<AnyColor>) -> Self
Dart TimePickerThemeData(backgroundColor:).
Dart TimePickerThemeData(cancelButtonStyle:).
Dart TimePickerThemeData(confirmButtonStyle:).
Sourcepub fn day_period_border_side(self, day_period_border_side: BorderSide) -> Self
pub fn day_period_border_side(self, day_period_border_side: BorderSide) -> Self
Dart TimePickerThemeData(dayPeriodBorderSide:).
Sourcepub fn day_period_color(self, day_period_color: impl Into<AnyColor>) -> Self
pub fn day_period_color(self, day_period_color: impl Into<AnyColor>) -> Self
Dart TimePickerThemeData(dayPeriodColor:).
Sourcepub fn day_period_shape(
self,
day_period_shape: impl Into<OutlinedBorderRef>,
) -> Self
pub fn day_period_shape( self, day_period_shape: impl Into<OutlinedBorderRef>, ) -> Self
Dart TimePickerThemeData(dayPeriodShape:).
Sourcepub fn day_period_text_color(
self,
day_period_text_color: impl Into<AnyColor>,
) -> Self
pub fn day_period_text_color( self, day_period_text_color: impl Into<AnyColor>, ) -> Self
Dart TimePickerThemeData(dayPeriodTextColor:).
Sourcepub fn day_period_text_style(
self,
day_period_text_style: impl Into<AnyTextStyle>,
) -> Self
pub fn day_period_text_style( self, day_period_text_style: impl Into<AnyTextStyle>, ) -> Self
Dart TimePickerThemeData(dayPeriodTextStyle:).
Sourcepub fn dial_background_color(
self,
dial_background_color: impl Into<AnyColor>,
) -> Self
pub fn dial_background_color( self, dial_background_color: impl Into<AnyColor>, ) -> Self
Dart TimePickerThemeData(dialBackgroundColor:).
Sourcepub fn dial_hand_color(self, dial_hand_color: impl Into<AnyColor>) -> Self
pub fn dial_hand_color(self, dial_hand_color: impl Into<AnyColor>) -> Self
Dart TimePickerThemeData(dialHandColor:).
Sourcepub fn dial_text_color(self, dial_text_color: impl Into<AnyColor>) -> Self
pub fn dial_text_color(self, dial_text_color: impl Into<AnyColor>) -> Self
Dart TimePickerThemeData(dialTextColor:).
Sourcepub fn dial_text_style(self, dial_text_style: impl Into<AnyTextStyle>) -> Self
pub fn dial_text_style(self, dial_text_style: impl Into<AnyTextStyle>) -> Self
Dart TimePickerThemeData(dialTextStyle:).
Sourcepub fn entry_mode_icon_color(
self,
entry_mode_icon_color: impl Into<AnyColor>,
) -> Self
pub fn entry_mode_icon_color( self, entry_mode_icon_color: impl Into<AnyColor>, ) -> Self
Dart TimePickerThemeData(entryModeIconColor:).
Sourcepub fn help_text_style(self, help_text_style: impl Into<AnyTextStyle>) -> Self
pub fn help_text_style(self, help_text_style: impl Into<AnyTextStyle>) -> Self
Dart TimePickerThemeData(helpTextStyle:).
Sourcepub fn hour_minute_color(self, hour_minute_color: impl Into<AnyColor>) -> Self
pub fn hour_minute_color(self, hour_minute_color: impl Into<AnyColor>) -> Self
Dart TimePickerThemeData(hourMinuteColor:).
Sourcepub fn hour_minute_shape(
self,
hour_minute_shape: impl Into<ShapeBorderRef>,
) -> Self
pub fn hour_minute_shape( self, hour_minute_shape: impl Into<ShapeBorderRef>, ) -> Self
Dart TimePickerThemeData(hourMinuteShape:).
Sourcepub fn hour_minute_text_color(
self,
hour_minute_text_color: impl Into<AnyColor>,
) -> Self
pub fn hour_minute_text_color( self, hour_minute_text_color: impl Into<AnyColor>, ) -> Self
Dart TimePickerThemeData(hourMinuteTextColor:).
Sourcepub fn hour_minute_text_style(
self,
hour_minute_text_style: impl Into<AnyTextStyle>,
) -> Self
pub fn hour_minute_text_style( self, hour_minute_text_style: impl Into<AnyTextStyle>, ) -> Self
Dart TimePickerThemeData(hourMinuteTextStyle:).
Sourcepub fn input_decoration_theme(
self,
input_decoration_theme: impl Into<InputDecorationThemeData>,
) -> Self
pub fn input_decoration_theme( self, input_decoration_theme: impl Into<InputDecorationThemeData>, ) -> Self
Dart TimePickerThemeData(inputDecorationTheme:).
Sourcepub fn padding(self, padding: impl Into<EdgeInsetsGeometry>) -> Self
pub fn padding(self, padding: impl Into<EdgeInsetsGeometry>) -> Self
Dart TimePickerThemeData(padding:).
Sourcepub fn shape(self, shape: impl Into<ShapeBorderRef>) -> Self
pub fn shape(self, shape: impl Into<ShapeBorderRef>) -> Self
Dart TimePickerThemeData(shape:).
Sourcepub fn time_selector_separator_color(
self,
time_selector_separator_color: WidgetStatePropertyRef<Option<Color>>,
) -> Self
pub fn time_selector_separator_color( self, time_selector_separator_color: WidgetStatePropertyRef<Option<Color>>, ) -> Self
Dart TimePickerThemeData(timeSelectorSeparatorColor:).
Sourcepub fn time_selector_separator_text_style(
self,
time_selector_separator_text_style: WidgetStatePropertyRef<Option<TextStyle>>,
) -> Self
pub fn time_selector_separator_text_style( self, time_selector_separator_text_style: WidgetStatePropertyRef<Option<TextStyle>>, ) -> Self
Dart TimePickerThemeData(timeSelectorSeparatorTextStyle:).
Sourcepub fn copy_with(&self) -> TimePickerThemeData
pub fn copy_with(&self) -> TimePickerThemeData
Creates a copy of this object with the given fields replaced with the new values.
Dart’s named arguments are the fluent setters on the copy
(data.copy_with().elevation(4.0)).
Sourcepub fn lerp(
a: Option<&TimePickerThemeData>,
b: Option<&TimePickerThemeData>,
t: f64,
) -> TimePickerThemeData
pub fn lerp( a: Option<&TimePickerThemeData>, b: Option<&TimePickerThemeData>, t: f64, ) -> TimePickerThemeData
Linearly interpolate between two time picker themes.
Trait Implementations§
Source§impl Clone for TimePickerThemeData
impl Clone for TimePickerThemeData
Source§impl Debug for TimePickerThemeData
impl Debug for TimePickerThemeData
Source§impl Default for TimePickerThemeData
impl Default for TimePickerThemeData
Source§impl Diagnosticable for TimePickerThemeData
impl Diagnosticable for TimePickerThemeData
Source§fn debug_fill_properties(&self, properties: &mut DiagnosticPropertiesBuilder)
fn debug_fill_properties(&self, properties: &mut DiagnosticPropertiesBuilder)
Source§fn type_name(&self) -> &'static str
fn type_name(&self) -> &'static str
Object.runtimeType as diagnostics print it: the last segment of
the Rust type path, without generic arguments.Source§fn identity_hash(&self) -> u64
fn identity_hash(&self) -> u64
Object.hashCode as diagnostics print it: the object’s address.Source§fn to_string_short(&self) -> String
fn to_string_short(&self) -> String
Source§fn to_diagnostics_node(&self) -> DiagnosticableNode
fn to_diagnostics_node(&self) -> DiagnosticableNode
DiagnosticsNode::to_string_deep.Source§fn to_diagnostics_node_with(
&self,
name: Option<String>,
style: Option<DiagnosticsTreeStyle>,
) -> DiagnosticableNode
fn to_diagnostics_node_with( &self, name: Option<String>, style: Option<DiagnosticsTreeStyle>, ) -> DiagnosticableNode
toDiagnosticsNode(name:, style:).Source§fn to_string(&self) -> String
fn to_string(&self) -> String
toString: a single-line description with properties and no
children. Read moreSource§fn to_string_at(&self, min_level: DiagnosticLevel) -> String
fn to_string_at(&self, min_level: DiagnosticLevel) -> String
toString(minLevel:).Source§impl Display for TimePickerThemeData
impl Display for TimePickerThemeData
Source§impl PartialEq for TimePickerThemeData
impl PartialEq for TimePickerThemeData
Source§impl TimePickerThemeDataGetters for TimePickerThemeData
impl TimePickerThemeDataGetters for TimePickerThemeData
Source§fn time_picker_theme_data(&self) -> &TimePickerThemeData
fn time_picker_theme_data(&self) -> &TimePickerThemeData
super(...)
arguments a defaults struct keeps.cancel_button_style getter.confirm_button_style getter.Source§fn day_period_border_side(&self, app: &mut App) -> Option<BorderSide>
fn day_period_border_side(&self, app: &mut App) -> Option<BorderSide>
day_period_border_side getter.Source§fn day_period_shape(&self, app: &mut App) -> Option<OutlinedBorderRef>
fn day_period_shape(&self, app: &mut App) -> Option<OutlinedBorderRef>
day_period_shape getter.Source§fn day_period_text_color(&self, app: &mut App) -> Option<AnyColor>
fn day_period_text_color(&self, app: &mut App) -> Option<AnyColor>
day_period_text_color getter.Source§fn day_period_text_style(&self, app: &mut App) -> Option<AnyTextStyle>
fn day_period_text_style(&self, app: &mut App) -> Option<AnyTextStyle>
day_period_text_style getter.Source§fn dial_background_color(&self, app: &mut App) -> Option<AnyColor>
fn dial_background_color(&self, app: &mut App) -> Option<AnyColor>
dial_background_color getter.Source§fn dial_text_style(&self, app: &mut App) -> Option<AnyTextStyle>
fn dial_text_style(&self, app: &mut App) -> Option<AnyTextStyle>
dial_text_style getter.Source§fn entry_mode_icon_color(&self, app: &mut App) -> Option<AnyColor>
fn entry_mode_icon_color(&self, app: &mut App) -> Option<AnyColor>
entry_mode_icon_color getter.Source§fn help_text_style(&self, app: &mut App) -> Option<AnyTextStyle>
fn help_text_style(&self, app: &mut App) -> Option<AnyTextStyle>
help_text_style getter.Source§fn hour_minute_color(&self, app: &mut App) -> Option<AnyColor>
fn hour_minute_color(&self, app: &mut App) -> Option<AnyColor>
hour_minute_color getter.Source§fn hour_minute_shape(&self, app: &mut App) -> Option<ShapeBorderRef>
fn hour_minute_shape(&self, app: &mut App) -> Option<ShapeBorderRef>
hour_minute_shape getter.Source§fn hour_minute_text_color(&self, app: &mut App) -> Option<AnyColor>
fn hour_minute_text_color(&self, app: &mut App) -> Option<AnyColor>
hour_minute_text_color getter.Source§fn hour_minute_text_style(&self, app: &mut App) -> Option<AnyTextStyle>
fn hour_minute_text_style(&self, app: &mut App) -> Option<AnyTextStyle>
hour_minute_text_style getter.Source§fn input_decoration_theme(
&self,
app: &mut App,
) -> Option<InputDecorationThemeData>
fn input_decoration_theme( &self, app: &mut App, ) -> Option<InputDecorationThemeData>
input_decoration_theme getter.Source§fn time_selector_separator_color(
&self,
app: &mut App,
) -> Option<WidgetStatePropertyRef<Option<Color>>>
fn time_selector_separator_color( &self, app: &mut App, ) -> Option<WidgetStatePropertyRef<Option<Color>>>
time_selector_separator_color getter.Source§fn time_selector_separator_text_style(
&self,
app: &mut App,
) -> Option<WidgetStatePropertyRef<Option<TextStyle>>>
fn time_selector_separator_text_style( &self, app: &mut App, ) -> Option<WidgetStatePropertyRef<Option<TextStyle>>>
time_selector_separator_text_style getter.Source§fn copy_with(&self, app: &mut App) -> TimePickerThemeData
fn copy_with(&self, app: &mut App) -> TimePickerThemeData
copyWith() with no arguments: a plain value holding what every getter
answers, for the caller’s setters to change.