pub struct TooltipThemeData {Show 16 fields
pub height: Option<f64>,
pub constraints: Option<BoxConstraints>,
pub padding: Option<EdgeInsetsGeometry>,
pub margin: Option<EdgeInsetsGeometry>,
pub vertical_offset: Option<f64>,
pub prefer_below: Option<bool>,
pub exclude_from_semantics: Option<bool>,
pub decoration: Option<DecorationRef>,
pub text_style: Option<TextStyle>,
pub text_align: Option<TextAlign>,
pub wait_duration: Option<Duration>,
pub show_duration: Option<Duration>,
pub exit_duration: Option<Duration>,
pub trigger_mode: Option<TooltipTriggerMode>,
pub enable_feedback: Option<bool>,
pub ignore_pointer: Option<bool>,
}Expand description
Defines default property values for descendant Tooltip widgets.
Descendant widgets obtain the current TooltipThemeData object using
TooltipTheme::of. Instances of TooltipThemeData can be customized
with TooltipThemeData::copy_with.
Typically a TooltipThemeData is specified as part of the overall Theme
with ThemeData::tooltip_theme.
See also:
TooltipTheme, a widget which overrides the tooltip theme for a subtree.ThemeData::tooltip_theme, which specifies a tooltip theme as part of an overall theme.MaterialApp::theme, which specifies a theme for the whole application.
Fields§
§height: Option<f64>Use TooltipThemeData.constraints instead. This feature was deprecated after v3.30.0-0.1.pre.
The minimum height of the Tooltip’s message.
constraints: Option<BoxConstraints>Constrains the size of the Tooltip’s message.
padding: Option<EdgeInsetsGeometry>If provided, the amount of space by which to inset the Tooltip’s message.
margin: Option<EdgeInsetsGeometry>If provided, the amount of empty space to surround the Tooltip.
vertical_offset: Option<f64>The vertical gap between the widget and the displayed tooltip.
When prefer_below is set to true and tooltips have sufficient
space to display themselves, this property defines how much vertical space
tooltips will position themselves under their corresponding widgets.
Otherwise, tooltips will position themselves above their corresponding
widgets with the given offset.
prefer_below: Option<bool>Whether the tooltip is displayed below its widget by default.
If there is insufficient space to display the tooltip in the preferred direction, the tooltip will be displayed in the opposite direction.
Applying false for the entire app is recommended
to avoid having a finger or cursor hide a tooltip.
exclude_from_semantics: Option<bool>Whether the Tooltip::message should be excluded from the semantics
tree.
By default, Tooltips will add a Semantics label that is set to
Tooltip::message. Set this property to true if the app is going to
provide its own custom semantics label.
decoration: Option<DecorationRef>The Tooltip’s shape and background color.
text_style: Option<TextStyle>The style to use for the message of Tooltips.
text_align: Option<TextAlign>The TextAlign to use for the message of Tooltips.
wait_duration: Option<Duration>The length of time that a pointer must hover over a tooltip’s widget before the tooltip will be shown.
show_duration: Option<Duration>The length of time that the tooltip will be shown once it has appeared.
exit_duration: Option<Duration>The length of time that a pointer must have stopped hovering over a tooltip’s widget before the tooltip will be hidden.
trigger_mode: Option<TooltipTriggerMode>The TooltipTriggerMode that will show the tooltip.
enable_feedback: Option<bool>Whether the tooltip should provide acoustic and/or haptic feedback.
For example, on Android a tap will produce a clicking sound and a long-press will produce a short vibration, when feedback is enabled.
This value is used if Tooltip::enable_feedback is null.
If this value is null, the default is true.
See also:
Feedback, for providing platform-specific feedback to certain actions.
ignore_pointer: Option<bool>Whether the tooltip overlay should be invisible to hit testing.
If false, moving the mouse pointer onto the tooltip overlay keeps the
tooltip visible (satisfying WCAG 1.4.13 Hoverable).
This value is used if Tooltip::ignore_pointer is null.
Implementations§
Source§impl TooltipThemeData
impl TooltipThemeData
Sourcepub fn new() -> TooltipThemeData
pub fn new() -> TooltipThemeData
Creates the set of properties used to configure Tooltips; Dart’s optional named
arguments are the fluent setters.
Sourcepub fn height(self, height: f64) -> TooltipThemeData
👎Deprecated: Use TooltipThemeData.constraints instead. This feature was deprecated after v3.30.0-0.1.pre.
pub fn height(self, height: f64) -> TooltipThemeData
Use TooltipThemeData.constraints instead. This feature was deprecated after v3.30.0-0.1.pre.
Dart TooltipThemeData(height:).
Sourcepub fn constraints(self, constraints: BoxConstraints) -> TooltipThemeData
pub fn constraints(self, constraints: BoxConstraints) -> TooltipThemeData
Dart TooltipThemeData(constraints:).
Sourcepub fn padding(self, padding: impl Into<EdgeInsetsGeometry>) -> TooltipThemeData
pub fn padding(self, padding: impl Into<EdgeInsetsGeometry>) -> TooltipThemeData
Dart TooltipThemeData(padding:).
Sourcepub fn margin(self, margin: impl Into<EdgeInsetsGeometry>) -> TooltipThemeData
pub fn margin(self, margin: impl Into<EdgeInsetsGeometry>) -> TooltipThemeData
Dart TooltipThemeData(margin:).
Sourcepub fn vertical_offset(self, vertical_offset: f64) -> TooltipThemeData
pub fn vertical_offset(self, vertical_offset: f64) -> TooltipThemeData
Dart TooltipThemeData(verticalOffset:).
Sourcepub fn prefer_below(self, prefer_below: bool) -> TooltipThemeData
pub fn prefer_below(self, prefer_below: bool) -> TooltipThemeData
Dart TooltipThemeData(preferBelow:).
Sourcepub fn exclude_from_semantics(
self,
exclude_from_semantics: bool,
) -> TooltipThemeData
pub fn exclude_from_semantics( self, exclude_from_semantics: bool, ) -> TooltipThemeData
Dart TooltipThemeData(excludeFromSemantics:).
Sourcepub fn decoration(
self,
decoration: impl Into<DecorationRef>,
) -> TooltipThemeData
pub fn decoration( self, decoration: impl Into<DecorationRef>, ) -> TooltipThemeData
Dart TooltipThemeData(decoration:).
Sourcepub fn text_style(self, text_style: TextStyle) -> TooltipThemeData
pub fn text_style(self, text_style: TextStyle) -> TooltipThemeData
Dart TooltipThemeData(textStyle:).
Sourcepub fn text_align(self, text_align: TextAlign) -> TooltipThemeData
pub fn text_align(self, text_align: TextAlign) -> TooltipThemeData
Dart TooltipThemeData(textAlign:).
Sourcepub fn wait_duration(self, wait_duration: Duration) -> TooltipThemeData
pub fn wait_duration(self, wait_duration: Duration) -> TooltipThemeData
Dart TooltipThemeData(waitDuration:).
Sourcepub fn show_duration(self, show_duration: Duration) -> TooltipThemeData
pub fn show_duration(self, show_duration: Duration) -> TooltipThemeData
Dart TooltipThemeData(showDuration:).
Sourcepub fn exit_duration(self, exit_duration: Duration) -> TooltipThemeData
pub fn exit_duration(self, exit_duration: Duration) -> TooltipThemeData
Dart TooltipThemeData(exitDuration:).
Sourcepub fn trigger_mode(self, trigger_mode: TooltipTriggerMode) -> TooltipThemeData
pub fn trigger_mode(self, trigger_mode: TooltipTriggerMode) -> TooltipThemeData
Dart TooltipThemeData(triggerMode:).
Sourcepub fn enable_feedback(self, enable_feedback: bool) -> TooltipThemeData
pub fn enable_feedback(self, enable_feedback: bool) -> TooltipThemeData
Dart TooltipThemeData(enableFeedback:).
Sourcepub fn ignore_pointer(self, ignore_pointer: bool) -> TooltipThemeData
pub fn ignore_pointer(self, ignore_pointer: bool) -> TooltipThemeData
Dart TooltipThemeData(ignorePointer:).
Sourcepub fn copy_with(&self) -> TooltipThemeData
pub fn copy_with(&self) -> TooltipThemeData
Creates a copy of this object but with the given fields replaced with the new values.
Dart’s named arguments are the fluent setters on the copy
(data.copy_with().prefer_below(false)).
Sourcepub fn lerp(
a: Option<&TooltipThemeData>,
b: Option<&TooltipThemeData>,
t: f64,
) -> Option<TooltipThemeData>
pub fn lerp( a: Option<&TooltipThemeData>, b: Option<&TooltipThemeData>, t: f64, ) -> Option<TooltipThemeData>
Linearly interpolate between two tooltip themes.
If both arguments are null, then null is returned.
{@macro dart.ui.shadow.lerp}
Trait Implementations§
Source§impl Clone for TooltipThemeData
impl Clone for TooltipThemeData
Source§impl Debug for TooltipThemeData
impl Debug for TooltipThemeData
Source§impl Default for TooltipThemeData
impl Default for TooltipThemeData
Source§impl Diagnosticable for TooltipThemeData
impl Diagnosticable for TooltipThemeData
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:).