pub struct TabBarThemeData {Show 17 fields
pub indicator: Option<DecorationRef>,
pub indicator_color: Option<Color>,
pub indicator_size: Option<TabBarIndicatorSize>,
pub divider_color: Option<Color>,
pub divider_height: Option<f64>,
pub label_color: Option<AnyColor>,
pub label_padding: Option<EdgeInsetsGeometry>,
pub label_style: Option<TextStyle>,
pub unselected_label_color: Option<Color>,
pub unselected_label_style: Option<TextStyle>,
pub overlay_color: Option<WidgetStatePropertyRef<Option<Color>>>,
pub splash_factory: Option<InteractiveInkFeatureFactoryRef>,
pub mouse_cursor: Option<WidgetStatePropertyRef<Option<MouseCursorRef>>>,
pub tab_alignment: Option<TabAlignment>,
pub text_scaler: Option<TextScaler>,
pub indicator_animation: Option<TabIndicatorAnimation>,
pub splash_border_radius: Option<BorderRadius>,
}Expand description
Defines default property values for descendant TabBar widgets.
Descendant widgets obtain the current TabBarThemeData object using
TabBarTheme::of. Instances of TabBarThemeData can be customized
with TabBarThemeData::copy_with.
Typically a TabBarThemeData is specified as part of the overall Theme
with ThemeData::tab_bar_theme.
All TabBarThemeData properties are null by default. When null, the TabBar
will use the values from ThemeData if they exist, otherwise it will
provide its own defaults. See the individual TabBar properties for details.
See also:
TabBar, which displays a row of tabs.ThemeData, which describes the overall theme information for the application.
Fields§
§indicator: Option<DecorationRef>Overrides the default value for TabBar::indicator.
indicator_color: Option<Color>Overrides the default value for TabBar::indicator_color.
indicator_size: Option<TabBarIndicatorSize>Overrides the default value for TabBar::indicator_size.
divider_color: Option<Color>Overrides the default value for TabBar::divider_color.
divider_height: Option<f64>Overrides the default value for TabBar::divider_height.
label_color: Option<AnyColor>Overrides the default value for TabBar::label_color.
If label_color is a WidgetStateColor, then the effective color will
depend on the WidgetState::Selected state, i.e. if the Tab is
selected or not. In case of unselected state, this WidgetStateColor’s
resolved color will be used even if TabBar::unselected_label_color or
unselected_label_color is non-null.
label_padding: Option<EdgeInsetsGeometry>Overrides the default value for TabBar::label_padding.
If there are few tabs with both icon and text and few tabs with only icon or text, this padding is vertically adjusted to provide uniform padding to all tabs.
label_style: Option<TextStyle>Overrides the default value for TabBar::label_style.
unselected_label_color: Option<Color>Overrides the default value for TabBar::unselected_label_color.
unselected_label_style: Option<TextStyle>Overrides the default value for TabBar::unselected_label_style.
overlay_color: Option<WidgetStatePropertyRef<Option<Color>>>Overrides the default value for TabBar::overlay_color.
splash_factory: Option<InteractiveInkFeatureFactoryRef>Overrides the default value for TabBar::splash_factory.
mouse_cursor: Option<WidgetStatePropertyRef<Option<MouseCursorRef>>>The cursor for a mouse pointer when it enters or is hovering over the individual tab widgets.
If TabBar::mouse_cursor is a WidgetStateMouseCursor,
WidgetStateProperty::resolve is used for the following WidgetStates:
WidgetState::Selected.
If specified, overrides the default value of TabBar::mouse_cursor.
tab_alignment: Option<TabAlignment>Overrides the default value for TabBar::tab_alignment.
text_scaler: Option<TextScaler>Overrides the default value for TabBar::text_scaler.
indicator_animation: Option<TabIndicatorAnimation>Overrides the default value for TabBar::indicator_animation.
splash_border_radius: Option<BorderRadius>Defines the clipping radius of splashes that extend outside the bounds of the tab.
Implementations§
Source§impl TabBarThemeData
impl TabBarThemeData
Sourcepub fn new() -> TabBarThemeData
pub fn new() -> TabBarThemeData
Creates a tab bar theme that can be used with ThemeData::tab_bar_theme; Dart’s
named arguments are the fluent setters.
Sourcepub fn indicator(self, indicator: impl Into<DecorationRef>) -> TabBarThemeData
pub fn indicator(self, indicator: impl Into<DecorationRef>) -> TabBarThemeData
Dart TabBarThemeData(indicator:).
Sourcepub fn indicator_color(self, indicator_color: Color) -> TabBarThemeData
pub fn indicator_color(self, indicator_color: Color) -> TabBarThemeData
Dart TabBarThemeData(indicatorColor:).
Sourcepub fn indicator_size(
self,
indicator_size: TabBarIndicatorSize,
) -> TabBarThemeData
pub fn indicator_size( self, indicator_size: TabBarIndicatorSize, ) -> TabBarThemeData
Dart TabBarThemeData(indicatorSize:).
Sourcepub fn divider_color(self, divider_color: Color) -> TabBarThemeData
pub fn divider_color(self, divider_color: Color) -> TabBarThemeData
Dart TabBarThemeData(dividerColor:).
Sourcepub fn divider_height(self, divider_height: f64) -> TabBarThemeData
pub fn divider_height(self, divider_height: f64) -> TabBarThemeData
Dart TabBarThemeData(dividerHeight:).
Sourcepub fn label_color(self, label_color: impl Into<AnyColor>) -> TabBarThemeData
pub fn label_color(self, label_color: impl Into<AnyColor>) -> TabBarThemeData
Dart TabBarThemeData(labelColor:).
Sourcepub fn label_padding(
self,
label_padding: impl Into<EdgeInsetsGeometry>,
) -> TabBarThemeData
pub fn label_padding( self, label_padding: impl Into<EdgeInsetsGeometry>, ) -> TabBarThemeData
Dart TabBarThemeData(labelPadding:).
Sourcepub fn label_style(self, label_style: TextStyle) -> TabBarThemeData
pub fn label_style(self, label_style: TextStyle) -> TabBarThemeData
Dart TabBarThemeData(labelStyle:).
Sourcepub fn unselected_label_color(
self,
unselected_label_color: Color,
) -> TabBarThemeData
pub fn unselected_label_color( self, unselected_label_color: Color, ) -> TabBarThemeData
Dart TabBarThemeData(unselectedLabelColor:).
Sourcepub fn unselected_label_style(
self,
unselected_label_style: TextStyle,
) -> TabBarThemeData
pub fn unselected_label_style( self, unselected_label_style: TextStyle, ) -> TabBarThemeData
Dart TabBarThemeData(unselectedLabelStyle:).
Sourcepub fn overlay_color(
self,
overlay_color: WidgetStatePropertyRef<Option<Color>>,
) -> TabBarThemeData
pub fn overlay_color( self, overlay_color: WidgetStatePropertyRef<Option<Color>>, ) -> TabBarThemeData
Dart TabBarThemeData(overlayColor:).
Sourcepub fn splash_factory(
self,
splash_factory: InteractiveInkFeatureFactoryRef,
) -> TabBarThemeData
pub fn splash_factory( self, splash_factory: InteractiveInkFeatureFactoryRef, ) -> TabBarThemeData
Dart TabBarThemeData(splashFactory:).
Sourcepub fn mouse_cursor(
self,
mouse_cursor: WidgetStatePropertyRef<Option<MouseCursorRef>>,
) -> TabBarThemeData
pub fn mouse_cursor( self, mouse_cursor: WidgetStatePropertyRef<Option<MouseCursorRef>>, ) -> TabBarThemeData
Dart TabBarThemeData(mouseCursor:).
Sourcepub fn tab_alignment(self, tab_alignment: TabAlignment) -> TabBarThemeData
pub fn tab_alignment(self, tab_alignment: TabAlignment) -> TabBarThemeData
Dart TabBarThemeData(tabAlignment:).
Sourcepub fn text_scaler(self, text_scaler: TextScaler) -> TabBarThemeData
pub fn text_scaler(self, text_scaler: TextScaler) -> TabBarThemeData
Dart TabBarThemeData(textScaler:).
Sourcepub fn indicator_animation(
self,
indicator_animation: TabIndicatorAnimation,
) -> TabBarThemeData
pub fn indicator_animation( self, indicator_animation: TabIndicatorAnimation, ) -> TabBarThemeData
Dart TabBarThemeData(indicatorAnimation:).
Sourcepub fn splash_border_radius(
self,
splash_border_radius: BorderRadius,
) -> TabBarThemeData
pub fn splash_border_radius( self, splash_border_radius: BorderRadius, ) -> TabBarThemeData
Dart TabBarThemeData(splashBorderRadius:).
Sourcepub fn copy_with(&self) -> TabBarThemeData
pub fn copy_with(&self) -> TabBarThemeData
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().divider_height(2.0)).
Sourcepub fn lerp(a: &TabBarThemeData, b: &TabBarThemeData, t: f64) -> TabBarThemeData
pub fn lerp(a: &TabBarThemeData, b: &TabBarThemeData, t: f64) -> TabBarThemeData
Linearly interpolate between two tab bar themes.
{@macro dart.ui.shadow.lerp}
Trait Implementations§
Source§impl Clone for TabBarThemeData
impl Clone for TabBarThemeData
Source§impl Debug for TabBarThemeData
impl Debug for TabBarThemeData
Source§impl Default for TabBarThemeData
impl Default for TabBarThemeData
Source§impl Diagnosticable for TabBarThemeData
impl Diagnosticable for TabBarThemeData
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 TabBarThemeData
impl Display for TabBarThemeData
Source§impl PartialEq for TabBarThemeData
impl PartialEq for TabBarThemeData
Source§impl TabBarThemeDataGetters for TabBarThemeData
impl TabBarThemeDataGetters for TabBarThemeData
Source§fn tab_bar_theme_data(&self) -> &TabBarThemeData
fn tab_bar_theme_data(&self) -> &TabBarThemeData
super(...)
arguments a defaults struct keeps.Source§fn indicator_size(&self, app: &mut App) -> Option<TabBarIndicatorSize>
fn indicator_size(&self, app: &mut App) -> Option<TabBarIndicatorSize>
indicator_size getter.Source§fn label_padding(&self, app: &mut App) -> Option<EdgeInsetsGeometry>
fn label_padding(&self, app: &mut App) -> Option<EdgeInsetsGeometry>
label_padding getter.Source§fn unselected_label_color(&self, app: &mut App) -> Option<Color>
fn unselected_label_color(&self, app: &mut App) -> Option<Color>
unselected_label_color getter.Source§fn unselected_label_style(&self, app: &mut App) -> Option<TextStyle>
fn unselected_label_style(&self, app: &mut App) -> Option<TextStyle>
unselected_label_style getter.Source§fn overlay_color(
&self,
app: &mut App,
) -> Option<WidgetStatePropertyRef<Option<Color>>>
fn overlay_color( &self, app: &mut App, ) -> Option<WidgetStatePropertyRef<Option<Color>>>
overlay_color getter.Source§fn splash_factory(
&self,
app: &mut App,
) -> Option<InteractiveInkFeatureFactoryRef>
fn splash_factory( &self, app: &mut App, ) -> Option<InteractiveInkFeatureFactoryRef>
splash_factory getter.Source§fn mouse_cursor(
&self,
app: &mut App,
) -> Option<WidgetStatePropertyRef<Option<MouseCursorRef>>>
fn mouse_cursor( &self, app: &mut App, ) -> Option<WidgetStatePropertyRef<Option<MouseCursorRef>>>
mouse_cursor getter.Source§fn tab_alignment(&self, app: &mut App) -> Option<TabAlignment>
fn tab_alignment(&self, app: &mut App) -> Option<TabAlignment>
tab_alignment getter.Source§fn text_scaler(&self, app: &mut App) -> Option<TextScaler>
fn text_scaler(&self, app: &mut App) -> Option<TextScaler>
text_scaler getter.Source§fn indicator_animation(&self, app: &mut App) -> Option<TabIndicatorAnimation>
fn indicator_animation(&self, app: &mut App) -> Option<TabIndicatorAnimation>
indicator_animation getter.Source§fn splash_border_radius(&self, app: &mut App) -> Option<BorderRadius>
fn splash_border_radius(&self, app: &mut App) -> Option<BorderRadius>
splash_border_radius getter.Source§fn copy_with(&self, app: &mut App) -> TabBarThemeData
fn copy_with(&self, app: &mut App) -> TabBarThemeData
copyWith() with no arguments: a plain value holding what every getter
answers, for the caller’s setters to change.