pub struct FromTextStyle<'a> { /* private fields */ }Expand description
Builds a StrutStyle from a TextStyle’s equivalent fields, with Dart’s named
overrides.
Implementations§
Source§impl FromTextStyle<'_>
impl FromTextStyle<'_>
Sourcepub fn font_family(self, font_family: impl Into<String>) -> FromTextStyle<'_>
pub fn font_family(self, font_family: impl Into<String>) -> FromTextStyle<'_>
Overrides the text style’s fontFamily.
Sourcepub fn font_family_fallback(
self,
font_family_fallback: Vec<String>,
) -> FromTextStyle<'_>
pub fn font_family_fallback( self, font_family_fallback: Vec<String>, ) -> FromTextStyle<'_>
Overrides the text style’s fontFamilyFallback.
Sourcepub fn font_size(self, font_size: f64) -> FromTextStyle<'_>
pub fn font_size(self, font_size: f64) -> FromTextStyle<'_>
Overrides the text style’s fontSize.
Sourcepub fn height(self, height: f64) -> FromTextStyle<'_>
pub fn height(self, height: f64) -> FromTextStyle<'_>
Overrides the text style’s height.
Sourcepub fn leading_distribution(
self,
leading_distribution: TextLeadingDistribution,
) -> FromTextStyle<'_>
pub fn leading_distribution( self, leading_distribution: TextLeadingDistribution, ) -> FromTextStyle<'_>
Overrides the text style’s leadingDistribution.
Sourcepub fn leading(self, leading: f64) -> FromTextStyle<'_>
pub fn leading(self, leading: f64) -> FromTextStyle<'_>
TextStyle has no equivalent property.
Sourcepub fn font_weight(self, font_weight: FontWeight) -> FromTextStyle<'_>
pub fn font_weight(self, font_weight: FontWeight) -> FromTextStyle<'_>
Overrides the text style’s fontWeight.
Sourcepub fn font_style(self, font_style: FontStyle) -> FromTextStyle<'_>
pub fn font_style(self, font_style: FontStyle) -> FromTextStyle<'_>
Overrides the text style’s fontStyle.
Sourcepub fn force_strut_height(self, force_strut_height: bool) -> FromTextStyle<'_>
pub fn force_strut_height(self, force_strut_height: bool) -> FromTextStyle<'_>
StrutStyle-unique property.
Sourcepub fn debug_label(self, debug_label: impl Into<String>) -> FromTextStyle<'_>
pub fn debug_label(self, debug_label: impl Into<String>) -> FromTextStyle<'_>
Overrides the text style’s debugLabel.
Sourcepub fn package(self, package: impl Into<String>) -> FromTextStyle<'_>
pub fn package(self, package: impl Into<String>) -> FromTextStyle<'_>
Prefixes the family names with packages/package_name/.
Sourcepub fn build(self) -> StrutStyle
pub fn build(self) -> StrutStyle
The built strut style.
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for FromTextStyle<'a>
impl<'a> !Send for FromTextStyle<'a>
impl<'a> !Sync for FromTextStyle<'a>
impl<'a> !UnwindSafe for FromTextStyle<'a>
impl<'a> Forget for FromTextStyle<'a>
impl<'a> Freeze for FromTextStyle<'a>
impl<'a> Move for FromTextStyle<'a>
impl<'a> Unpin for FromTextStyle<'a>
impl<'a> UnsafeUnpin for FromTextStyle<'a>where
&'a TextStyle: UnsafeUnpin,
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<String>: 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
Mutably borrows from an owned value. Read more