pub struct RelativePositionedTransition {
pub key: Option<KeyRef>,
pub rect: AnimationRef<Option<Rect>>,
pub size: Size,
pub child: WidgetRef,
}Expand description
Animated version of Positioned which transitions the child’s position
based on the value of rect relative to a bounding box with the
specified size.
Only works if it’s the child of a Stack.
See also:
PositionedTransition, a widget that animates its child from a start position to an end position over the lifetime of the animation.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.SlideTransition, a widget that animates the position of a widget relative to its normal position.
Fields§
§key: Option<KeyRef>See Widget::key.
rect: AnimationRef<Option<Rect>>The animation that controls the child’s size and position.
If the animation returns a None Rect, the rect is assumed to be
Rect::ZERO.
See also:
size, which gets the size of the box that thePositionedwidget’s offsets are relative to.
size: SizeThe Positioned widget’s offsets are relative to a box of this
size whose origin is 0,0.
child: WidgetRefThe widget below this widget in the tree.
Implementations§
Source§impl RelativePositionedTransition
impl RelativePositionedTransition
Sourcepub fn new<K>(
rect: AnimationRef<Option<Rect>>,
size: Size,
child: impl IntoWidget<K>,
) -> RelativePositionedTransition
pub fn new<K>( rect: AnimationRef<Option<Rect>>, size: Size, child: impl IntoWidget<K>, ) -> RelativePositionedTransition
Sourcepub fn key(self, key: KeyRef) -> RelativePositionedTransition
pub fn key(self, key: KeyRef) -> RelativePositionedTransition
Dart RelativePositionedTransition(key:).
Trait Implementations§
Source§impl AnimatedWidget for RelativePositionedTransition
impl AnimatedWidget for RelativePositionedTransition
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 RelativePositionedTransition
impl !Send for RelativePositionedTransition
impl !Sync for RelativePositionedTransition
impl !UnwindSafe for RelativePositionedTransition
impl Forget for RelativePositionedTransition
impl Freeze for RelativePositionedTransitionwhere
*const RcInner<dyn Key> is !null: Freeze,
PhantomData<RcInner<dyn Key>>: Freeze,
NonZero<u32>: Freeze,
&'static AnimationVTable<Option<Rect>>: 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 RelativePositionedTransition
impl Unpin for RelativePositionedTransition
impl UnsafeUnpin for RelativePositionedTransitionwhere
*const RcInner<dyn Key> is !null: UnsafeUnpin,
PhantomData<RcInner<dyn Key>>: UnsafeUnpin,
NonZeroU32Inner: UnsafeUnpin,
&'static AnimationVTable<Option<Rect>>: 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.