pub struct InkRipple { /* 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 60% of the final radius. The splash origin
animates to the center of its reference_box.
This object is rarely created directly. Instead of creating an ink ripple,
consider using an InkResponse or InkWell
widget, which uses gestures (such as tap and long-press) to trigger ink splashes. This
class is used when the ThemeData’s splash factory is
InkRipple::splash_factory.
See also:
InkSplash, which is an ink splash feature that expands less aggressively than the ripple.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.
Implementations§
Source§impl InkRipple
impl InkRipple
Sourcepub fn new(
app: &mut App,
controller: AnyMaterialInkController,
reference_box: AnyRenderBox,
position: Offset,
color: Color,
text_direction: TextDirection,
contained_ink_well: bool,
rect_callback: Option<RectCallback>,
border_radius: Option<BorderRadius>,
custom_border: Option<ShapeBorderRef>,
radius: Option<f64>,
on_removed: Option<Listener>,
) -> Ref<InkRipple>
pub fn new( app: &mut App, controller: AnyMaterialInkController, reference_box: AnyRenderBox, position: Offset, color: Color, text_direction: TextDirection, contained_ink_well: bool, rect_callback: Option<RectCallback>, border_radius: Option<BorderRadius>, custom_border: Option<ShapeBorderRef>, radius: Option<f64>, on_removed: Option<Listener>, ) -> Ref<InkRipple>
Begin a ripple, 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 ripple 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 ripple is clipped only to the edges of the Material.
This is the default.
When the ripple 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 InkRipple
impl InkFeatureLeaf for InkRipple
Source§impl InkFeatureLeafData for InkRipple
impl InkFeatureLeafData for InkRipple
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 InkRipple
impl InteractiveInkFeatureLeafData for InkRipple
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 InkRipple
impl !Send for InkRipple
impl !Sync for InkRipple
impl !UnwindSafe for InkRipple
impl Forget for InkRipple
impl Freeze for InkRipplewhere
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 InkRipple
impl Unpin for InkRipple
impl UnsafeUnpin for InkRipplewhere
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.