pub struct AnimatedFractionallySizedBox {
pub child: Option<WidgetRef>,
pub height_factor: Option<f64>,
pub width_factor: Option<f64>,
pub alignment: AlignmentGeometry,
/* private fields */
}Expand description
Animated version of FractionallySizedBox which automatically transitions the
child’s size over a given duration whenever the given
width_factor or height_factor changes,
as well as the position whenever the given alignment changes.
For the animation, you can choose a curve as
well as a duration and the widget will
automatically animate to the new target width_factor or
height_factor.
See also:
AnimatedAlign, which is an implicitly animated version ofAlign.AnimatedContainer, which can transition more values at once.AnimatedSlide, which can animate the translation of child by a given offset relative to its size.AnimatedPositioned, which, as a child of aStack, automatically transitions its child’s position over a given duration whenever the given position changes.
Fields§
§child: Option<WidgetRef>The widget below this widget in the tree.
height_factor: Option<f64>§width_factor: Option<f64>§alignment: AlignmentGeometryImplementations§
Source§impl AnimatedFractionallySizedBox
impl AnimatedFractionallySizedBox
Sourcepub fn new(duration: Duration) -> AnimatedFractionallySizedBox
pub fn new(duration: Duration) -> AnimatedFractionallySizedBox
Creates a widget that sizes its child to a fraction of the total available space that animates implicitly, and positions its child by an alignment that animates implicitly.
Sourcepub fn alignment(
self,
alignment: AlignmentGeometry,
) -> AnimatedFractionallySizedBox
pub fn alignment( self, alignment: AlignmentGeometry, ) -> AnimatedFractionallySizedBox
Dart AnimatedFractionallySizedBox(alignment:).
Sourcepub fn child<K>(self, child: impl IntoWidget<K>) -> AnimatedFractionallySizedBox
pub fn child<K>(self, child: impl IntoWidget<K>) -> AnimatedFractionallySizedBox
Dart AnimatedFractionallySizedBox(child:).
Sourcepub fn height_factor(self, height_factor: f64) -> AnimatedFractionallySizedBox
pub fn height_factor(self, height_factor: f64) -> AnimatedFractionallySizedBox
Dart AnimatedFractionallySizedBox(heightFactor:).
Sourcepub fn width_factor(self, width_factor: f64) -> AnimatedFractionallySizedBox
pub fn width_factor(self, width_factor: f64) -> AnimatedFractionallySizedBox
Dart AnimatedFractionallySizedBox(widthFactor:).
Sourcepub fn key(self, key: KeyRef) -> AnimatedFractionallySizedBox
pub fn key(self, key: KeyRef) -> AnimatedFractionallySizedBox
Dart key:.
Sourcepub fn curve(self, curve: Rc<dyn Curve>) -> AnimatedFractionallySizedBox
pub fn curve(self, curve: Rc<dyn Curve>) -> AnimatedFractionallySizedBox
Dart curve:.
Sourcepub fn on_end(self, on_end: Listener) -> AnimatedFractionallySizedBox
pub fn on_end(self, on_end: Listener) -> AnimatedFractionallySizedBox
Dart onEnd:.
Trait Implementations§
Source§impl Debug for AnimatedFractionallySizedBox
impl Debug for AnimatedFractionallySizedBox
Source§impl ImplicitlyAnimatedWidget for AnimatedFractionallySizedBox
impl ImplicitlyAnimatedWidget for AnimatedFractionallySizedBox
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 AnimatedFractionallySizedBox
impl StatefulWidget for AnimatedFractionallySizedBox
Source§type State = AnimatedFractionallySizedBoxState
type State = AnimatedFractionallySizedBoxState
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) -> AnimatedFractionallySizedBoxState
fn create_state(&self) -> AnimatedFractionallySizedBoxState
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 AnimatedFractionallySizedBox
impl !Send for AnimatedFractionallySizedBox
impl !Sync for AnimatedFractionallySizedBox
impl !UnwindSafe for AnimatedFractionallySizedBox
impl Forget for AnimatedFractionallySizedBox
impl Freeze for AnimatedFractionallySizedBoxwhere
*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 AnimatedFractionallySizedBox
impl Unpin for AnimatedFractionallySizedBox
impl UnsafeUnpin for AnimatedFractionallySizedBoxwhere
*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.