MinimalHitTarget class

Hands the MinimalLayout.minHitTarget margin on through a parent that hugs small controls — a 28 px strip of pills, a bare Row holding a switch, a 20 px content line inside a padded row. A render box rejects every point outside its own size before any child sees it, so a control's own inflated target (MinimalPressable) is cut off wherever an ancestor is smaller than 44 px; wrapping that ancestor here restores it.

It pads the HIT-TEST region only, never layout or paint. line is the height of one line of controls (a pill row's 28 px); null takes the wrapped box's own height. A point within the margin that brings a line up to 44 is forwarded inset inside the box's nearest edge, past its border and padding, where one of its controls takes it. Only the margin a line needs is added: a box already 44 px tall gains nothing.

MinimalHitTarget(line: 28, child: Row(children: pills))
Inheritance
Annotations
  • @Deprecated('Not needed: since 0.2.0 each Minimal control lays its own tap target out ' '(ui_core\'s DesignTapTarget), whatever its parent. Remove the wrapper.')

Constructors

MinimalHitTarget({Key? key, double? line, double inset = 4, Widget? child})
Pads child's hit area to 44 px.
const

Properties

child → Widget?
The widget below this widget in the tree.
finalinherited
hashCode → int
The hash code for this object.
no setterinherited
inset → double
How far inside the box's nearest edge a margin point is forwarded.
final
key → Key?
Controls how one widget replaces another widget in the tree.
finalinherited
line → double?
The height of one line of controls; null takes the box's own height.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

createElement() → SingleChildRenderObjectElement
RenderObjectWidgets always inflate to a RenderObjectElement subclass.
inherited
createRenderObject(BuildContext context) → RenderObject
Creates an instance of the RenderObject class that this RenderObjectWidget represents, using the configuration described by this RenderObjectWidget.
override
debugDescribeChildren() → List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
override
didUnmountRenderObject(covariant RenderObject renderObject) → void
This method is called when a RenderObject that was previously associated with this widget is removed from the render tree. The provided RenderObject will be of the same type as the one created by this widget's createRenderObject method.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) → String
A string representation of this object.
inherited
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) → String
Returns a string representation of this node and its descendants.
inherited
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String
Returns a one-line detailed description of the object.
inherited
toStringShort() → String
A short, textual description of this widget.
inherited
updateRenderObject(BuildContext context, covariant RenderObject renderObject) → void
Copies the configuration described by this RenderObjectWidget to the given RenderObject, which will be of the same type as returned by this object's createRenderObject.
override

Operators

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