pub struct ScaleTransition {
pub key: Option<KeyRef>,
pub animation: AnimationRef<f64>,
pub alignment: Alignment,
pub filter_quality: Option<FilterQuality>,
pub child: Option<WidgetRef>,
}Expand description
Animates the scale of a transformed widget.
See also:
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.
Fields§
§key: Option<KeyRef>See Widget::key.
animation: AnimationRef<f64>See MatrixTransition::animation; read it as
scale.
alignment: Alignment§filter_quality: Option<FilterQuality>§child: Option<WidgetRef>The widget below this widget in the tree.
Implementations§
Source§impl ScaleTransition
impl ScaleTransition
Sourcepub fn new(scale: AnimationRef<f64>) -> ScaleTransition
pub fn new(scale: AnimationRef<f64>) -> ScaleTransition
Creates a scale transition.
The alignment defaults to Alignment::CENTER.
Sourcepub fn scale(&self) -> AnyAnimation<f64>
pub fn scale(&self) -> AnyAnimation<f64>
The animation that controls the scale of the child.
Sourcepub fn key(self, key: KeyRef) -> ScaleTransition
pub fn key(self, key: KeyRef) -> ScaleTransition
Dart ScaleTransition(key:).
Sourcepub fn alignment(self, alignment: Alignment) -> ScaleTransition
pub fn alignment(self, alignment: Alignment) -> ScaleTransition
Dart ScaleTransition(alignment:).
Sourcepub fn filter_quality(self, filter_quality: FilterQuality) -> ScaleTransition
pub fn filter_quality(self, filter_quality: FilterQuality) -> ScaleTransition
Dart ScaleTransition(filterQuality:).
Sourcepub fn child<K>(self, child: impl IntoWidget<K>) -> ScaleTransition
pub fn child<K>(self, child: impl IntoWidget<K>) -> ScaleTransition
Dart ScaleTransition(child:).
Trait Implementations§
Source§impl AnimatedWidget for ScaleTransition
impl AnimatedWidget for ScaleTransition
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 ScaleTransition
impl !Send for ScaleTransition
impl !Sync for ScaleTransition
impl !UnwindSafe for ScaleTransition
impl Forget for ScaleTransition
impl Freeze for ScaleTransitionwhere
*const RcInner<dyn Key> is !null: Freeze,
PhantomData<RcInner<dyn Key>>: Freeze,
NonZero<u32>: Freeze,
&'static AnimationVTable<f64>: 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 ScaleTransition
impl Unpin for ScaleTransition
impl UnsafeUnpin for ScaleTransitionwhere
*const RcInner<dyn Key> is !null: UnsafeUnpin,
PhantomData<RcInner<dyn Key>>: UnsafeUnpin,
NonZeroU32Inner: UnsafeUnpin,
&'static AnimationVTable<f64>: 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.