NoSplash class Null safety
An InteractiveInkFeature that doesn't paint a splash.
Use NoSplash.splashFactory to defeat the default ink splash drawn by an InkWell or ButtonStyle. For example, to create an ElevatedButton that does not draw the default "ripple" ink splash when it's tapped:
ElevatedButton(
style: ElevatedButton.styleFrom(
splashFactory: NoSplash.splashFactory,
),
onPressed: () { },
child: Text('No Splash'),
)
- Inheritance
-
- Object
- InkFeature
- InteractiveInkFeature
- NoSplash
Constructors
- NoSplash({required MaterialInkController controller, required RenderBox referenceBox, required Color color, VoidCallback? onRemoved})
- Create an InteractiveInkFeature that doesn't paint a splash.
Properties
- color ↔ Color
-
The ink's color.
read / writeinherited
- controller → MaterialInkController
-
The MaterialInkController associated with this InkFeature.
read-onlyinherited
- hashCode → int
-
The hash code for this object.
read-onlyinherited
- onRemoved → VoidCallback?
-
Called when the ink feature is no longer visible on the material.
finalinherited
- referenceBox → RenderBox
-
The render box whose visual position defines the frame of reference for this ink feature.
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
read-onlyinherited
Methods
-
cancel(
) → void -
Called when the user input that triggered this feature's appearance was canceled.
inherited
-
confirm(
) → void -
Called when the user input that triggered this feature's appearance was confirmed.
inherited
-
dispose(
) → void -
Free up the resources associated with this ink feature.
mustCallSuper">@mustCallSuperinherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a non-existent method or property is accessed.
inherited
-
paintFeature(
Canvas canvas, Matrix4 transform) → void -
Override this method to paint the ink feature.
override
-
paintInkCircle(
{required Canvas canvas, required Matrix4 transform, required Paint paint, required Offset center, required double radius, TextDirection? textDirection, ShapeBorder? customBorder, BorderRadius borderRadius = BorderRadius.zero, RectCallback? clipCallback}) → void -
Draws an ink splash or ink ripple on the passed in Canvas.
protected">@protectedinherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
- splashFactory → const InteractiveInkFeatureFactory
-
Used to specify this type of ink splash for an InkWell, InkResponse
material Theme, or ButtonStyle.
_NoSplashFactory()