pub struct DefaultTextStyleTransition {
pub key: Option<KeyRef>,
pub style: AnimationRef<TextStyle>,
pub text_align: Option<TextAlign>,
pub soft_wrap: bool,
pub overflow: TextOverflow,
pub max_lines: Option<i32>,
pub child: WidgetRef,
}Expand description
Animated version of a DefaultTextStyle that animates the different properties
of its TextStyle.
See also:
AnimatedDefaultTextStyle, which animates changes in text style without taking an explicitAnimationargument.DefaultTextStyle, which also defines aTextStylefor its descendants but is not animated.
Fields§
§key: Option<KeyRef>See Widget::key.
style: AnimationRef<TextStyle>The animation that controls the descendants’ text style.
text_align: Option<TextAlign>How the text should be aligned horizontally.
soft_wrap: boolWhether the text should break at soft line breaks.
See DefaultTextStyle::soft_wrap for more details.
overflow: TextOverflowHow visual overflow should be handled.
max_lines: Option<i32>An optional maximum number of lines for the text to span, wrapping if necessary.
See DefaultTextStyle::max_lines for more details.
child: WidgetRefThe widget below this widget in the tree.
Implementations§
Source§impl DefaultTextStyleTransition
impl DefaultTextStyleTransition
Sourcepub fn new<K>(
style: AnimationRef<TextStyle>,
child: impl IntoWidget<K>,
) -> DefaultTextStyleTransition
pub fn new<K>( style: AnimationRef<TextStyle>, child: impl IntoWidget<K>, ) -> DefaultTextStyleTransition
Creates an animated DefaultTextStyle whose TextStyle animation updates
the widget.
Sourcepub fn key(self, key: KeyRef) -> DefaultTextStyleTransition
pub fn key(self, key: KeyRef) -> DefaultTextStyleTransition
Dart DefaultTextStyleTransition(key:).
Sourcepub fn text_align(self, text_align: TextAlign) -> DefaultTextStyleTransition
pub fn text_align(self, text_align: TextAlign) -> DefaultTextStyleTransition
Dart DefaultTextStyleTransition(textAlign:).
Sourcepub fn soft_wrap(self, soft_wrap: bool) -> DefaultTextStyleTransition
pub fn soft_wrap(self, soft_wrap: bool) -> DefaultTextStyleTransition
Dart DefaultTextStyleTransition(softWrap:).
Sourcepub fn overflow(self, overflow: TextOverflow) -> DefaultTextStyleTransition
pub fn overflow(self, overflow: TextOverflow) -> DefaultTextStyleTransition
Dart DefaultTextStyleTransition(overflow:).
Sourcepub fn max_lines(self, max_lines: i32) -> DefaultTextStyleTransition
pub fn max_lines(self, max_lines: i32) -> DefaultTextStyleTransition
Dart DefaultTextStyleTransition(maxLines:).
Trait Implementations§
Source§impl AnimatedWidget for DefaultTextStyleTransition
impl AnimatedWidget for DefaultTextStyleTransition
Source§fn listenable(&self) -> Rc<dyn Listenable>
fn listenable(&self) -> Rc<dyn Listenable>
Listenable to which this widget is listening. Read moreSource§fn build(&self, app: &mut App, _context: BuildContext) -> WidgetRef
fn build(&self, app: &mut App, _context: BuildContext) -> WidgetRef
Source§fn debug_fill_properties(&self, properties: &mut DiagnosticPropertiesBuilder)
fn debug_fill_properties(&self, properties: &mut DiagnosticPropertiesBuilder)
AnimatedWidget.debugFillProperties, which a subclass’s own body calls where
Dart writes super.Auto Trait Implementations§
impl !RefUnwindSafe for DefaultTextStyleTransition
impl !Send for DefaultTextStyleTransition
impl !Sync for DefaultTextStyleTransition
impl !UnwindSafe for DefaultTextStyleTransition
impl Forget for DefaultTextStyleTransition
impl Freeze for DefaultTextStyleTransitionwhere
*const RcInner<dyn Key> is !null: Freeze,
PhantomData<RcInner<dyn Key>>: Freeze,
NonZero<u32>: Freeze,
&'static AnimationVTable<TextStyle>: Freeze,
*const RcInner<Keep> is !null: Freeze,
PhantomData<RcInner<Keep>>: Freeze,
*const RcInner<dyn Widget> is !null: Freeze,
PhantomData<RcInner<dyn Widget>>: Freeze,
impl Move for DefaultTextStyleTransition
impl Unpin for DefaultTextStyleTransition
impl UnsafeUnpin for DefaultTextStyleTransitionwhere
*const RcInner<dyn Key> is !null: UnsafeUnpin,
PhantomData<RcInner<dyn Key>>: UnsafeUnpin,
NonZeroU32Inner: UnsafeUnpin,
&'static AnimationVTable<TextStyle>: UnsafeUnpin,
*const RcInner<Keep> is !null: UnsafeUnpin,
PhantomData<RcInner<Keep>>: UnsafeUnpin,
*const RcInner<dyn Widget> is !null: UnsafeUnpin,
PhantomData<RcInner<dyn Widget>>: 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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<W> IntoWidget<AnimatedKind> for Wwhere
W: AnimatedWidget,
impl<W> IntoWidget<AnimatedKind> for Wwhere
W: AnimatedWidget,
Source§fn into_widget(self) -> Rc<dyn Widget>
fn into_widget(self) -> Rc<dyn Widget>
creation_location.