pub struct AnimatedTheme {
pub data: Rc<ThemeData>,
pub child: WidgetRef,
/* private fields */
}Expand description
Animated version of Theme which automatically transitions the colors,
etc, over a given duration whenever the given theme changes.
See also:
Theme, whichAnimatedThemeuses to actually apply the interpolated theme.ThemeData, which describes the actual configuration of a theme.MaterialApp, which includes anAnimatedThemewidget configured via theMaterialApp.themeargument.
Fields§
§data: Rc<ThemeData>Specifies the color and typography values for descendant widgets.
child: WidgetRefThe widget below this widget in the tree.
Implementations§
Source§impl AnimatedTheme
impl AnimatedTheme
Sourcepub fn new<K>(
data: impl Into<Rc<ThemeData>>,
child: impl IntoWidget<K>,
) -> AnimatedTheme
pub fn new<K>( data: impl Into<Rc<ThemeData>>, child: impl IntoWidget<K>, ) -> AnimatedTheme
Creates an animated theme.
By default, the theme transition uses a linear curve.
Sourcepub fn duration(self, duration: Duration) -> AnimatedTheme
pub fn duration(self, duration: Duration) -> AnimatedTheme
Dart AnimatedTheme(duration:).
Sourcepub fn key(self, key: KeyRef) -> AnimatedTheme
pub fn key(self, key: KeyRef) -> AnimatedTheme
Dart key:.
Sourcepub fn curve(self, curve: Rc<dyn Curve>) -> AnimatedTheme
pub fn curve(self, curve: Rc<dyn Curve>) -> AnimatedTheme
Dart curve:.
Sourcepub fn on_end(self, on_end: Listener) -> AnimatedTheme
pub fn on_end(self, on_end: Listener) -> AnimatedTheme
Dart onEnd:.
Trait Implementations§
Source§impl Debug for AnimatedTheme
impl Debug for AnimatedTheme
Source§impl ImplicitlyAnimatedWidget for AnimatedTheme
impl ImplicitlyAnimatedWidget for AnimatedTheme
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 AnimatedTheme
impl StatefulWidget for AnimatedTheme
Source§type State = AnimatedThemeState
type State = AnimatedThemeState
The state this widget creates.
Source§fn create_state(&self) -> AnimatedThemeState
fn create_state(&self) -> AnimatedThemeState
Creates the mutable state for this widget at a given location in the tree. Read more
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 as_preferred_size_widget(
&self,
) -> Option<&(dyn PreferredSizeWidget + 'static)>
fn as_preferred_size_widget( &self, ) -> Option<&(dyn PreferredSizeWidget + 'static)>
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 AnimatedTheme
impl !Send for AnimatedTheme
impl !Sync for AnimatedTheme
impl !UnwindSafe for AnimatedTheme
impl Forget for AnimatedTheme
impl Freeze for AnimatedThemewhere
*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<ThemeData> is !null: Freeze,
PhantomData<RcInner<ThemeData>>: Freeze,
*const RcInner<dyn Widget> is !null: Freeze,
PhantomData<RcInner<dyn Widget>>: Freeze,
impl Move for AnimatedTheme
impl Unpin for AnimatedTheme
impl UnsafeUnpin for AnimatedThemewhere
*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<ThemeData> is !null: UnsafeUnpin,
PhantomData<RcInner<ThemeData>>: 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.