pub struct PositionedTransition {
pub key: Option<KeyRef>,
pub rect: AnimationRef<RelativeRect>,
pub child: WidgetRef,
}Expand description
Animated version of Positioned which takes a specific
Animation<RelativeRect> to transition the child’s position from a start
position to an end position over the lifetime of the animation.
Only works if it’s the child of a Stack.
See also:
AnimatedPositioned, which transitions a child’s position without taking an explicitAnimationargument.RelativePositionedTransition, a widget that transitions its child’s position based on the value of a rectangle relative to a bounding box.SlideTransition, a widget that animates the position of a widget relative to its normal position.AlignTransition, an animated version of anAlignthat animates itsAlign::alignmentproperty.ScaleTransition, a widget that animates the scale of a transformed widget.SizeTransition, a widget that animates its own size and clips and aligns its child.
Fields§
§key: Option<KeyRef>See Widget::key.
rect: AnimationRef<RelativeRect>The animation that controls the child’s size and position.
child: WidgetRefThe widget below this widget in the tree.
Implementations§
Source§impl PositionedTransition
impl PositionedTransition
Sourcepub fn new<K>(
rect: AnimationRef<RelativeRect>,
child: impl IntoWidget<K>,
) -> PositionedTransition
pub fn new<K>( rect: AnimationRef<RelativeRect>, child: impl IntoWidget<K>, ) -> PositionedTransition
Creates a transition for Positioned.
Sourcepub fn key(self, key: KeyRef) -> PositionedTransition
pub fn key(self, key: KeyRef) -> PositionedTransition
Dart PositionedTransition(key:).
Trait Implementations§
Source§impl AnimatedWidget for PositionedTransition
impl AnimatedWidget for PositionedTransition
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 PositionedTransition
impl !Send for PositionedTransition
impl !Sync for PositionedTransition
impl !UnwindSafe for PositionedTransition
impl Forget for PositionedTransition
impl Freeze for PositionedTransitionwhere
*const RcInner<dyn Key> is !null: Freeze,
PhantomData<RcInner<dyn Key>>: Freeze,
NonZero<u32>: Freeze,
&'static AnimationVTable<RelativeRect>: 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 PositionedTransition
impl Unpin for PositionedTransition
impl UnsafeUnpin for PositionedTransitionwhere
*const RcInner<dyn Key> is !null: UnsafeUnpin,
PhantomData<RcInner<dyn Key>>: UnsafeUnpin,
NonZeroU32Inner: UnsafeUnpin,
&'static AnimationVTable<RelativeRect>: 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.