Skip to main content

InteractiveInkFeatureLeaf

Trait InteractiveInkFeatureLeaf 

Source
pub trait InteractiveInkFeatureLeaf: InkFeatureLeaf + InteractiveInkFeatureLeafData {
    // Provided methods
    fn confirm(self: Handle<Self>, app: &mut App) { ... }
    fn cancel(self: Handle<Self>, app: &mut App) { ... }
}
Expand description

The virtuals of Dart’s abstract InteractiveInkFeature: an ink feature that displays a color “splash” in response to a user gesture that can be confirmed or canceled.

Subclasses call confirm when an input gesture is recognized. For example a press event might trigger an ink feature that’s confirmed when the corresponding up event is seen.

Subclasses call cancel when an input gesture is aborted before it is recognized. For example a press event might trigger an ink feature that’s canceled when the pointer is dragged out of the reference box.

The InkWell and InkResponse widgets generate instances of this class.

Provided Methods§

Source

fn confirm(self: Handle<Self>, app: &mut App)

Called when the user input that triggered this feature’s appearance was confirmed.

Typically causes the ink to propagate faster across the material. By default this method does nothing.

Source

fn cancel(self: Handle<Self>, app: &mut App)

Called when the user input that triggered this feature’s appearance was canceled.

Typically causes the ink to gradually disappear. By default this method does nothing.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§