pub struct AlignTransition {
pub key: Option<KeyRef>,
pub alignment: AnimationRef<AlignmentGeometry>,
pub width_factor: Option<f64>,
pub height_factor: Option<f64>,
pub child: WidgetRef,
}Expand description
Animated version of an Align that animates its Align::alignment property.
See also:
AnimatedAlign, which animates changes to thealignmentwithout taking an explicitAnimationargument.PositionedTransition, a widget that animates its child from a start position to an end position over the lifetime of the animation.RelativePositionedTransition, a widget that transitions its child’s position based on the value of a rectangle relative to a bounding box.SizeTransition, a widget that animates its own size and clips and aligns its child.SlideTransition, a widget that animates the position of a widget relative to its normal position.
Fields§
§key: Option<KeyRef>See Widget::key.
alignment: AnimationRef<AlignmentGeometry>The animation that controls the child’s alignment.
width_factor: Option<f64>If non-None, the child’s width factor, see Align::width_factor.
height_factor: Option<f64>If non-None, the child’s height factor, see Align::height_factor.
child: WidgetRefThe widget below this widget in the tree.
Implementations§
Source§impl AlignTransition
impl AlignTransition
Sourcepub fn new<K>(
alignment: AnimationRef<AlignmentGeometry>,
child: impl IntoWidget<K>,
) -> AlignTransition
pub fn new<K>( alignment: AnimationRef<AlignmentGeometry>, child: impl IntoWidget<K>, ) -> AlignTransition
Creates an animated Align whose AlignmentGeometry animation updates
the widget.
See also:
Align::new.
Sourcepub fn key(self, key: KeyRef) -> AlignTransition
pub fn key(self, key: KeyRef) -> AlignTransition
Dart AlignTransition(key:).
Sourcepub fn width_factor(self, width_factor: f64) -> AlignTransition
pub fn width_factor(self, width_factor: f64) -> AlignTransition
Dart AlignTransition(widthFactor:).
Sourcepub fn height_factor(self, height_factor: f64) -> AlignTransition
pub fn height_factor(self, height_factor: f64) -> AlignTransition
Dart AlignTransition(heightFactor:).
Trait Implementations§
Source§impl AnimatedWidget for AlignTransition
impl AnimatedWidget for AlignTransition
Source§fn listenable(&self) -> Rc<dyn Listenable>
fn listenable(&self) -> Rc<dyn Listenable>
The
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
Override this method to build widgets that depend on the state of the
listenable (e.g., the current value of the animation).
Source§fn debug_fill_properties(&self, properties: &mut DiagnosticPropertiesBuilder)
fn debug_fill_properties(&self, properties: &mut DiagnosticPropertiesBuilder)
Dart’s
AnimatedWidget.debugFillProperties, which a subclass’s own body calls where
Dart writes super.Auto Trait Implementations§
impl !RefUnwindSafe for AlignTransition
impl !Send for AlignTransition
impl !Sync for AlignTransition
impl !UnwindSafe for AlignTransition
impl Forget for AlignTransition
impl Freeze for AlignTransitionwhere
*const RcInner<dyn Key> is !null: Freeze,
PhantomData<RcInner<dyn Key>>: Freeze,
NonZero<u32>: Freeze,
&'static AnimationVTable<AlignmentGeometry>: 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 AlignTransition
impl Unpin for AlignTransition
impl UnsafeUnpin for AlignTransitionwhere
*const RcInner<dyn Key> is !null: UnsafeUnpin,
PhantomData<RcInner<dyn Key>>: UnsafeUnpin,
NonZeroU32Inner: UnsafeUnpin,
&'static AnimationVTable<AlignmentGeometry>: 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
Mutably borrows from an owned value. Read more
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>
The widget as a tree node, made where this is called: its
creation_location.