pub struct AnimatedScale {
pub child: Option<WidgetRef>,
pub scale: f64,
pub alignment: Alignment,
pub filter_quality: Option<FilterQuality>,
/* private fields */
}Expand description
Animated version of Transform.scale which automatically transitions the child’s
scale over a given duration whenever the given scale changes.
See also:
AnimatedRotation, for animating the rotation of a child.ScaleTransition, an explicitly animated version of this widget, where anAnimationis provided by the caller instead of being built in.
Fields§
§child: Option<WidgetRef>The widget below this widget in the tree.
scale: f64The target scale.
alignment: AlignmentThe alignment of the origin of the coordinate system in which the scale takes place, relative to the size of the box.
For example, to set the origin of the scale to bottom middle, you can use an alignment of (0.0, 1.0).
filter_quality: Option<FilterQuality>The filter quality with which to apply the transform as a bitmap operation.
The transform will be applied by re-rendering the child if
filter_quality is None, otherwise it controls the quality
of an ImageFilter.matrix applied to a bitmap rendering of the child.
Implementations§
Source§impl AnimatedScale
impl AnimatedScale
Sourcepub fn new(scale: f64, duration: Duration) -> AnimatedScale
pub fn new(scale: f64, duration: Duration) -> AnimatedScale
Creates a widget that animates its scale implicitly.
Sourcepub fn child<K>(self, child: impl IntoWidget<K>) -> AnimatedScale
pub fn child<K>(self, child: impl IntoWidget<K>) -> AnimatedScale
Dart AnimatedScale(child:).
Sourcepub fn alignment(self, alignment: Alignment) -> AnimatedScale
pub fn alignment(self, alignment: Alignment) -> AnimatedScale
Dart AnimatedScale(alignment:).
Sourcepub fn filter_quality(self, filter_quality: FilterQuality) -> AnimatedScale
pub fn filter_quality(self, filter_quality: FilterQuality) -> AnimatedScale
Dart AnimatedScale(filterQuality:).
Sourcepub fn key(self, key: KeyRef) -> AnimatedScale
pub fn key(self, key: KeyRef) -> AnimatedScale
Dart key:.
Sourcepub fn curve(self, curve: Rc<dyn Curve>) -> AnimatedScale
pub fn curve(self, curve: Rc<dyn Curve>) -> AnimatedScale
Dart curve:.
Sourcepub fn on_end(self, on_end: Listener) -> AnimatedScale
pub fn on_end(self, on_end: Listener) -> AnimatedScale
Dart onEnd:.
Trait Implementations§
Source§impl Debug for AnimatedScale
impl Debug for AnimatedScale
Source§impl ImplicitlyAnimatedWidget for AnimatedScale
impl ImplicitlyAnimatedWidget for AnimatedScale
Source§fn implicitly_animated_widget_data_mut(
&mut self,
) -> &mut ImplicitlyAnimatedWidgetData
fn implicitly_animated_widget_data_mut( &mut self, ) -> &mut ImplicitlyAnimatedWidgetData
ImplicitlyAnimatedWidgetData bag, mutably.Source§impl StatefulWidget for AnimatedScale
impl StatefulWidget for AnimatedScale
Source§type State = AnimatedScaleState
type State = AnimatedScaleState
Source§fn debug_fill_properties(
&self,
_app: &App,
properties: &mut DiagnosticPropertiesBuilder,
)
fn debug_fill_properties( &self, _app: &App, properties: &mut DiagnosticPropertiesBuilder, )
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) -> AnimatedScaleState
fn create_state(&self) -> AnimatedScaleState
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
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 AnimatedScale
impl !Send for AnimatedScale
impl !Sync for AnimatedScale
impl !UnwindSafe for AnimatedScale
impl Forget for AnimatedScale
impl Freeze for AnimatedScalewhere
*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 AnimatedScale
impl Unpin for AnimatedScale
impl UnsafeUnpin for AnimatedScalewhere
*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
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>
creation_location.