MaterialTapTargetPolicy class

Material tap target policy based on Flutter's ButtonStyleButton._InputPadding.

Uses MaterialTapTargetSize and VisualDensity from ThemeData to compute the minimum tap target size:

  • paddedSize(max(0, 48 + density.horizontal * 4), max(0, 48 + density.vertical * 4))
  • shrinkWrapSize.zero

Constructors

MaterialTapTargetPolicy()
const

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

minTapTargetSize({required BuildContext context, required HeadlessTapTargetComponent component}) Size
Returns the minimum tap target size for the given component.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

computeMinTapTargetSize({required MaterialTapTargetSize tapTargetSize, VisualDensity density = VisualDensity.standard}) Size
Pure computation for testing without BuildContext.