pub struct DecoratedBoxTransition {
pub key: Option<KeyRef>,
pub decoration: AnimationRef<DecorationRef>,
pub position: DecorationPosition,
pub child: WidgetRef,
}Expand description
Animated version of a DecoratedBox that animates the different properties
of its Decoration.
See also:
DecoratedBox, which also draws aDecorationbut is not animated.AnimatedContainer, a more full-featured container that also animates on decoration using an internal animation.
Fields§
§key: Option<KeyRef>See Widget::key.
decoration: AnimationRef<DecorationRef>Animation of the decoration to paint.
Can be created using a DecorationTween interpolating typically between
two BoxDecoration.
position: DecorationPositionWhether to paint the box decoration behind or in front of the child.
child: WidgetRefThe widget below this widget in the tree.
Implementations§
Source§impl DecoratedBoxTransition
impl DecoratedBoxTransition
Sourcepub fn new<K>(
decoration: AnimationRef<DecorationRef>,
child: impl IntoWidget<K>,
) -> DecoratedBoxTransition
pub fn new<K>( decoration: AnimationRef<DecorationRef>, child: impl IntoWidget<K>, ) -> DecoratedBoxTransition
Creates an animated DecoratedBox whose Decoration animation updates
the widget.
See also:
Sourcepub fn key(self, key: KeyRef) -> DecoratedBoxTransition
pub fn key(self, key: KeyRef) -> DecoratedBoxTransition
Dart DecoratedBoxTransition(key:).
Sourcepub fn position(self, position: DecorationPosition) -> DecoratedBoxTransition
pub fn position(self, position: DecorationPosition) -> DecoratedBoxTransition
Dart DecoratedBoxTransition(position:).
Trait Implementations§
Source§impl AnimatedWidget for DecoratedBoxTransition
impl AnimatedWidget for DecoratedBoxTransition
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 DecoratedBoxTransition
impl !Send for DecoratedBoxTransition
impl !Sync for DecoratedBoxTransition
impl !UnwindSafe for DecoratedBoxTransition
impl Forget for DecoratedBoxTransition
impl Freeze for DecoratedBoxTransitionwhere
*const RcInner<dyn Key> is !null: Freeze,
PhantomData<RcInner<dyn Key>>: Freeze,
NonZero<u32>: Freeze,
&'static AnimationVTable<DecorationRef>: 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 DecoratedBoxTransition
impl Unpin for DecoratedBoxTransition
impl UnsafeUnpin for DecoratedBoxTransitionwhere
*const RcInner<dyn Key> is !null: UnsafeUnpin,
PhantomData<RcInner<dyn Key>>: UnsafeUnpin,
NonZeroU32Inner: UnsafeUnpin,
&'static AnimationVTable<DecorationRef>: 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.