pub struct InkSplash { /* private fields */ }Expand description
A visual reaction on a piece of Material to user input.
A circular ink feature whose origin starts at the input touch point and whose radius expands from zero.
This object is rarely created directly. Instead of creating an ink splash
directly, consider using an InkResponse or
InkWell widget, which uses gestures (such as tap and long-press) to
trigger ink splashes.
See also:
InkRipple, which is an ink splash feature that expands more aggressively than this class does.InkResponse, which uses gestures to trigger ink highlights and ink splashes in the parentMaterial.InkWell, which is a rectangularInkResponse(the most common type of ink response).Material, which is the widget on which the ink splash is painted.InkHighlight, which is an ink feature that emphasizes a part of aMaterial.Ink, a convenience widget for drawing images and other decorations on Material widgets.
Implementations§
Source§impl InkSplash
impl InkSplash
Sourcepub fn new(
app: &mut App,
controller: AnyMaterialInkController,
reference_box: AnyRenderBox,
text_direction: TextDirection,
position: Option<Offset>,
color: Color,
contained_ink_well: bool,
rect_callback: Option<RectCallback>,
border_radius: Option<BorderRadius>,
custom_border: Option<ShapeBorderRef>,
radius: Option<f64>,
on_removed: Option<Listener>,
) -> Ref<InkSplash>
pub fn new( app: &mut App, controller: AnyMaterialInkController, reference_box: AnyRenderBox, text_direction: TextDirection, position: Option<Offset>, color: Color, contained_ink_well: bool, rect_callback: Option<RectCallback>, border_radius: Option<BorderRadius>, custom_border: Option<ShapeBorderRef>, radius: Option<f64>, on_removed: Option<Listener>, ) -> Ref<InkSplash>
Begin a splash, centered at position relative to reference_box.
The controller argument is typically obtained via Material::of(app, context).
If contained_ink_well is true, then the splash will be sized to fit
the well rectangle, then clipped to it when drawn. The well
rectangle is the box returned by rect_callback, if provided, or
otherwise is the bounds of the reference_box.
If contained_ink_well is false, then rect_callback should be null.
The ink splash is clipped only to the edges of the Material.
This is the default.
When the splash is removed, on_removed will be called.
Sourcepub fn splash_factory() -> InteractiveInkFeatureFactoryRef
pub fn splash_factory() -> InteractiveInkFeatureFactoryRef
Used to specify this type of ink splash for an InkWell,
InkResponse, material Theme, or ButtonStyle.
Dart’s static const: every call hands out the same factory, so they compare equal.
Trait Implementations§
Source§impl InkFeatureLeaf for InkSplash
impl InkFeatureLeaf for InkSplash
Source§impl InkFeatureLeafData for InkSplash
impl InkFeatureLeafData for InkSplash
Source§fn ink_feature(&self) -> &InkFeatureData
fn ink_feature(&self) -> &InkFeatureData
InkFeature bag.Source§fn ink_feature_mut(&mut self) -> &mut InkFeatureData
fn ink_feature_mut(&mut self) -> &mut InkFeatureData
InkFeature bag, mutably.Source§impl InteractiveInkFeatureLeafData for InkSplash
impl InteractiveInkFeatureLeafData for InkSplash
Source§fn interactive_ink_feature(&self) -> &InteractiveInkFeatureData
fn interactive_ink_feature(&self) -> &InteractiveInkFeatureData
InteractiveInkFeature bag.Source§fn interactive_ink_feature_mut(&mut self) -> &mut InteractiveInkFeatureData
fn interactive_ink_feature_mut(&mut self) -> &mut InteractiveInkFeatureData
InteractiveInkFeature bag, mutably.Auto Trait Implementations§
impl !RefUnwindSafe for InkSplash
impl !Send for InkSplash
impl !Sync for InkSplash
impl !UnwindSafe for InkSplash
impl Forget for InkSplash
impl Freeze for InkSplashwhere
NonZero<u32>: Freeze,
PhantomData<fn() -> RenderInkFeatures>: Freeze,
&'static RenderBoxVTable: Freeze,
*const RcInner<dyn Fn(&mut App)> is !null: Freeze,
PhantomData<RcInner<dyn Fn(&mut App)>>: Freeze,
*const (): Freeze,
*const RcInner<dyn ShapeBorder> is !null: Freeze,
PhantomData<RcInner<dyn ShapeBorder>>: Freeze,
*const RcInner<dyn Fn(&App) -> Rect> is !null: Freeze,
PhantomData<RcInner<dyn Fn(&App) -> Rect>>: Freeze,
&'static AnimationVTable<f64>: Freeze,
*const RcInner<Keep> is !null: Freeze,
PhantomData<RcInner<Keep>>: Freeze,
PhantomData<fn() -> AnimationController>: Freeze,
&'static AnimationVTable<i64>: Freeze,
impl Move for InkSplash
impl Unpin for InkSplash
impl UnsafeUnpin for InkSplashwhere
NonZeroU32Inner: UnsafeUnpin,
PhantomData<fn() -> RenderInkFeatures>: UnsafeUnpin,
&'static RenderBoxVTable: UnsafeUnpin,
*const RcInner<dyn Fn(&mut App)> is !null: UnsafeUnpin,
PhantomData<RcInner<dyn Fn(&mut App)>>: UnsafeUnpin,
*const (): UnsafeUnpin,
*const RcInner<dyn ShapeBorder> is !null: UnsafeUnpin,
PhantomData<RcInner<dyn ShapeBorder>>: UnsafeUnpin,
*const RcInner<dyn Fn(&App) -> Rect> is !null: UnsafeUnpin,
PhantomData<RcInner<dyn Fn(&App) -> Rect>>: UnsafeUnpin,
&'static AnimationVTable<f64>: UnsafeUnpin,
*const RcInner<Keep> is !null: UnsafeUnpin,
PhantomData<RcInner<Keep>>: UnsafeUnpin,
PhantomData<fn() -> AnimationController>: UnsafeUnpin,
&'static AnimationVTable<i64>: 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<F> InkFeatureObject for Fwhere
F: InkFeatureLeaf,
impl<F> InkFeatureObject for Fwhere
F: InkFeatureLeaf,
Source§fn as_ink_feature(self: Handle<F>) -> AnyInkFeature
fn as_ink_feature(self: Handle<F>) -> AnyInkFeature
AnyInkFeature — what to pass where a Dart API takes an
InkFeature.Source§impl<F> InteractiveInkFeatureObject for Fwhere
F: InteractiveInkFeatureLeaf,
impl<F> InteractiveInkFeatureObject for Fwhere
F: InteractiveInkFeatureLeaf,
Source§fn as_interactive_ink_feature(self: Handle<F>) -> AnyInteractiveInkFeature
fn as_interactive_ink_feature(self: Handle<F>) -> AnyInteractiveInkFeature
AnyInteractiveInkFeature — what to pass where a Dart API
takes an InteractiveInkFeature.