pub trait RenderAnimatedOpacityMixin: RenderObjectWithChildMixin<ChildType = AnyRenderBox> + RenderBox {
// Required methods
fn animated_opacity_data(
self: RenderHandle<Self>,
app: &App,
) -> &RenderAnimatedOpacityData;
fn animated_opacity_data_mut(
self: RenderHandle<Self>,
app: &mut App,
) -> &mut RenderAnimatedOpacityData;
// Provided methods
fn is_repaint_boundary(self: RenderHandle<Self>, app: &App) -> bool { ... }
fn update_composited_layer(
self: RenderHandle<Self>,
app: &mut App,
old_layer: Option<AnyOffsetLayer>,
) -> AnyOffsetLayer { ... }
fn opacity(self: RenderHandle<Self>, app: &App) -> AnyAnimation<f64> { ... }
fn set_opacity(
self: RenderHandle<Self>,
app: &mut App,
value: AnyAnimation<f64>,
) { ... }
fn did_attach(self: RenderHandle<Self>, app: &mut App) { ... }
fn did_detach(self: RenderHandle<Self>, app: &mut App) { ... }
fn opacity_listener(self: RenderHandle<Self>) -> Listener { ... }
fn update_opacity(self: RenderHandle<Self>, app: &mut App) { ... }
fn paint(
self: RenderHandle<Self>,
app: &mut App,
context: &mut PaintingContext,
offset: Offset,
)
where Self: RenderProxyBoxMixin { ... }
}Expand description
Implementation of RenderAnimatedOpacity and RenderSliverAnimatedOpacity.
This mixin allows the logic of animating opacity to be used with different
layout models, e.g. the way that RenderAnimatedOpacity uses it for
RenderBox and RenderSliverAnimatedOpacity uses it for RenderSliver.
The host wires the virtuals: is_repaint_boundary, update_composited_layer, did_attach,
did_detach, and paint call the same-named functions here.
Required Methods§
Sourcefn animated_opacity_data(
self: RenderHandle<Self>,
app: &App,
) -> &RenderAnimatedOpacityData
fn animated_opacity_data( self: RenderHandle<Self>, app: &App, ) -> &RenderAnimatedOpacityData
Mixin field access.
Sourcefn animated_opacity_data_mut(
self: RenderHandle<Self>,
app: &mut App,
) -> &mut RenderAnimatedOpacityData
fn animated_opacity_data_mut( self: RenderHandle<Self>, app: &mut App, ) -> &mut RenderAnimatedOpacityData
Provided Methods§
Sourcefn is_repaint_boundary(self: RenderHandle<Self>, app: &App) -> bool
fn is_repaint_boundary(self: RenderHandle<Self>, app: &App) -> bool
Flutter’s isRepaintBoundary.
Sourcefn update_composited_layer(
self: RenderHandle<Self>,
app: &mut App,
old_layer: Option<AnyOffsetLayer>,
) -> AnyOffsetLayer
fn update_composited_layer( self: RenderHandle<Self>, app: &mut App, old_layer: Option<AnyOffsetLayer>, ) -> AnyOffsetLayer
Flutter’s updateCompositedLayer.
Sourcefn opacity(self: RenderHandle<Self>, app: &App) -> AnyAnimation<f64>
fn opacity(self: RenderHandle<Self>, app: &App) -> AnyAnimation<f64>
The animation that drives this render object’s opacity.
An opacity of 1.0 is fully opaque. An opacity of 0.0 is fully transparent (i.e., invisible).
Sourcefn set_opacity(
self: RenderHandle<Self>,
app: &mut App,
value: AnyAnimation<f64>,
)
fn set_opacity( self: RenderHandle<Self>, app: &mut App, value: AnyAnimation<f64>, )
Sets opacity.
Sourcefn did_attach(self: RenderHandle<Self>, app: &mut App)
fn did_attach(self: RenderHandle<Self>, app: &mut App)
Flutter’s attach after super.attach(owner).
Sourcefn did_detach(self: RenderHandle<Self>, app: &mut App)
fn did_detach(self: RenderHandle<Self>, app: &mut App)
Flutter’s detach before super.detach().
Sourcefn opacity_listener(self: RenderHandle<Self>) -> Listener
fn opacity_listener(self: RenderHandle<Self>) -> Listener
The _updateOpacity tear-off, equal to itself across registrations.
Sourcefn update_opacity(self: RenderHandle<Self>, app: &mut App)
fn update_opacity(self: RenderHandle<Self>, app: &mut App)
Flutter’s _updateOpacity.
Sourcefn paint(
self: RenderHandle<Self>,
app: &mut App,
context: &mut PaintingContext,
offset: Offset,
)where
Self: RenderProxyBoxMixin,
fn paint(
self: RenderHandle<Self>,
app: &mut App,
context: &mut PaintingContext,
offset: Offset,
)where
Self: RenderProxyBoxMixin,
Flutter’s paint: nothing when fully transparent, else the proxy paint.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".