pub struct SnapshotController { /* private fields */ }Expand description
A controller for the SnapshotWidget that controls when the child image is displayed
and when to regenerated the child image.
When the value of allow_snapshotting is true, the
SnapshotWidget will paint the child widgets based on the SnapshotMode of the
snapshot widget.
The controller notifies its listeners when the value of
allow_snapshotting changes or when clear is
called.
To force SnapshotWidget to recreate the child image, call clear.
Implementations§
Source§impl SnapshotController
impl SnapshotController
Sourcepub fn new(app: &mut App, allow_snapshotting: bool) -> Ref<SnapshotController>
pub fn new(app: &mut App, allow_snapshotting: bool) -> Ref<SnapshotController>
Create a new SnapshotController.
By default, allow_snapshotting is false: Dart’s
SnapshotController({bool allowSnapshotting = false}).
Sourcepub fn clear(self: Handle<Self>, app: &mut App)
pub fn clear(self: Handle<Self>, app: &mut App)
Reset the snapshot held by any listening SnapshotWidget.
This has no effect if allow_snapshotting is false.
Sourcepub fn allow_snapshotting(self: Handle<Self>, app: &App) -> bool
pub fn allow_snapshotting(self: Handle<Self>, app: &App) -> bool
Whether a snapshot of this child widget is painted in its place.
Sourcepub fn set_allow_snapshotting(self: Handle<Self>, app: &mut App, value: bool)
pub fn set_allow_snapshotting(self: Handle<Self>, app: &mut App, value: bool)
Sets allow_snapshotting.
Trait Implementations§
Source§impl ChangeNotifier for SnapshotController
impl ChangeNotifier for SnapshotController
fn change_notifier_data(&self) -> &ChangeNotifierData
fn change_notifier_data_mut(&mut self) -> &mut ChangeNotifierData
Source§fn will_add_listener(self: Handle<Self>, app: &mut App)
fn will_add_listener(self: Handle<Self>, app: &mut App)
addListener that
work before super.addListener go here.Source§fn did_remove_listener(self: Handle<Self>, app: &mut App)
fn did_remove_listener(self: Handle<Self>, app: &mut App)
removeListener that
work after super.removeListener go here.