pub struct CupertinoTextThemeData {
pub primary_color: Option<CupertinoDynamicColor>,
pub text_style: Option<TextStyle>,
pub action_text_style: Option<TextStyle>,
pub action_small_text_style: Option<TextStyle>,
pub tab_label_text_style: Option<TextStyle>,
pub nav_title_text_style: Option<TextStyle>,
pub nav_large_title_text_style: Option<TextStyle>,
pub nav_action_text_style: Option<TextStyle>,
pub picker_text_style: Option<TextStyle>,
pub date_time_picker_text_style: Option<TextStyle>,
}Expand description
The type of the Apple-style widgets as asked for: each style an application sets, or
None for the default.
The defaults are the reference’s (cupertino/text_theme.dart): body text at 17 px, a
navigation bar’s title semibold at 17, its large title bold at 34, a tab’s label at 10,
and the letter spacing Apple’s guidelines give each. Their colours adapt: the label colour
for text, the primary colour for actions, the inactive grey for tab labels.
The reference names Apple’s system faces, which exist only on Apple’s platforms; the defaults here name no family, so they are set in the application’s own.
Fields§
§primary_color: Option<CupertinoDynamicColor>The colour of the actions’ text. Unset, the system blue — or, for the defaults the theme makes when no text theme is given, the theme’s primary colour.
text_style: Option<TextStyle>Body text.
action_text_style: Option<TextStyle>The text of a button.
action_small_text_style: Option<TextStyle>The text of a small button.
tab_label_text_style: Option<TextStyle>A tab bar’s labels.
A navigation bar’s title.
A navigation bar’s large title.
A navigation bar’s buttons.
picker_text_style: Option<TextStyle>A picker’s items.
date_time_picker_text_style: Option<TextStyle>A date and time picker’s items.
Implementations§
Source§impl CupertinoTextThemeData
impl CupertinoTextThemeData
Sourcepub fn primary_color(self, color: impl Into<CupertinoDynamicColor>) -> Self
pub fn primary_color(self, color: impl Into<CupertinoDynamicColor>) -> Self
The same, its actions in color.
Sourcepub const fn text_style(self, style: TextStyle) -> Self
pub const fn text_style(self, style: TextStyle) -> Self
The same, its body text in style.
Sourcepub const fn action_text_style(self, style: TextStyle) -> Self
pub const fn action_text_style(self, style: TextStyle) -> Self
The same, its buttons’ text in style.
The same, its navigation bar’s title in style.
The same, its navigation bar’s large title in style.
Sourcepub fn resolve(&self, theme: &Theme) -> CupertinoTextTheme
pub fn resolve(&self, theme: &Theme) -> CupertinoTextTheme
Every style, for where it is used: a style asked for as it was asked, a default in
the colour theme resolves its role to.