pub struct AnimatedSlide {
pub child: Option<WidgetRef>,
pub offset: Offset,
/* private fields */
}Expand description
Widget which automatically transitions the child’s offset relative to its normal position whenever the given offset changes.
The translation is expressed as an Offset scaled to the child’s size. For
example, an Offset with a dx of 0.25 will result in a horizontal
translation of one quarter the width of the child.
See also:
AnimatedPositioned, which, as a child of aStack, automatically transitions its child’s position over a given duration whenever the given position changes.AnimatedAlign, which automatically transitions its child’s position over a given duration whenever the givenAnimatedAlign::alignmentchanges.
Fields§
§child: Option<WidgetRef>The widget below this widget in the tree.
offset: OffsetThe target offset.
The child will be translated horizontally by width * dx and vertically by
height * dy.
Implementations§
Source§impl AnimatedSlide
impl AnimatedSlide
Sourcepub fn new(offset: Offset, duration: Duration) -> AnimatedSlide
pub fn new(offset: Offset, duration: Duration) -> AnimatedSlide
Creates a widget that animates its offset translation implicitly.
Sourcepub fn child<K>(self, child: impl IntoWidget<K>) -> AnimatedSlide
pub fn child<K>(self, child: impl IntoWidget<K>) -> AnimatedSlide
Dart AnimatedSlide(child:).
Sourcepub fn key(self, key: KeyRef) -> AnimatedSlide
pub fn key(self, key: KeyRef) -> AnimatedSlide
Dart key:.
Sourcepub fn curve(self, curve: Rc<dyn Curve>) -> AnimatedSlide
pub fn curve(self, curve: Rc<dyn Curve>) -> AnimatedSlide
Dart curve:.
Sourcepub fn on_end(self, on_end: Listener) -> AnimatedSlide
pub fn on_end(self, on_end: Listener) -> AnimatedSlide
Dart onEnd:.
Trait Implementations§
Source§impl Debug for AnimatedSlide
impl Debug for AnimatedSlide
Source§impl ImplicitlyAnimatedWidget for AnimatedSlide
impl ImplicitlyAnimatedWidget for AnimatedSlide
Source§fn implicitly_animated_widget_data_mut(
&mut self,
) -> &mut ImplicitlyAnimatedWidgetData
fn implicitly_animated_widget_data_mut( &mut self, ) -> &mut ImplicitlyAnimatedWidgetData
The
ImplicitlyAnimatedWidgetData bag, mutably.Source§impl StatefulWidget for AnimatedSlide
impl StatefulWidget for AnimatedSlide
Source§type State = AnimatedSlideState
type State = AnimatedSlideState
The state this widget creates.
Source§fn debug_fill_properties(
&self,
_app: &App,
properties: &mut DiagnosticPropertiesBuilder,
)
fn debug_fill_properties( &self, _app: &App, properties: &mut DiagnosticPropertiesBuilder, )
Dart’s
debugFillProperties: the properties a dump shows for this widget, in Dart’s
order. Dart’s Widget base only sets the dense tree style, which the framework does.Source§fn create_state(&self) -> AnimatedSlideState
fn create_state(&self) -> AnimatedSlideState
Creates the mutable state for this widget at a given location in the tree. Read more
Source§fn as_preferred_size_widget(&self) -> Option<&dyn PreferredSizeWidget>
fn as_preferred_size_widget(&self) -> Option<&dyn PreferredSizeWidget>
Source§fn type_name(&self) -> &'static str
fn type_name(&self) -> &'static str
See
Widget::type_name. A stateful form another widget kind becomes (an animated or
status transition widget) names the widget it wraps.Auto Trait Implementations§
impl !RefUnwindSafe for AnimatedSlide
impl !Send for AnimatedSlide
impl !Sync for AnimatedSlide
impl !UnwindSafe for AnimatedSlide
impl Forget for AnimatedSlide
impl Freeze for AnimatedSlidewhere
*const RcInner<dyn Key> is !null: Freeze,
PhantomData<RcInner<dyn Key>>: Freeze,
*const RcInner<dyn Curve> is !null: Freeze,
PhantomData<RcInner<dyn Curve>>: Freeze,
*const RcInner<dyn Fn(&mut App)> is !null: Freeze,
PhantomData<RcInner<dyn Fn(&mut App)>>: Freeze,
NonZero<u32>: Freeze,
*const (): Freeze,
*const RcInner<dyn Widget> is !null: Freeze,
PhantomData<RcInner<dyn Widget>>: Freeze,
impl Move for AnimatedSlide
impl Unpin for AnimatedSlide
impl UnsafeUnpin for AnimatedSlidewhere
*const RcInner<dyn Key> is !null: UnsafeUnpin,
PhantomData<RcInner<dyn Key>>: UnsafeUnpin,
*const RcInner<dyn Curve> is !null: UnsafeUnpin,
PhantomData<RcInner<dyn Curve>>: UnsafeUnpin,
*const RcInner<dyn Fn(&mut App)> is !null: UnsafeUnpin,
PhantomData<RcInner<dyn Fn(&mut App)>>: UnsafeUnpin,
NonZeroU32Inner: UnsafeUnpin,
*const (): 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<StatefulKind> for Wwhere
W: StatefulWidget,
impl<W> IntoWidget<StatefulKind> for Wwhere
W: StatefulWidget,
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.