PressSurface class

A surface that answers a press with ink or a tint, rings itself when a key or remote moves focus to it, and eases between fills. See Press in .agents/surfaces.md.

Inheritance

Constructors

PressSurface({Key? key, required Color fill, required OutlinedBorder shape, PressLook look = PressLook.ink, BorderSide side = BorderSide.none, Color? ringColor, bool ringStandsOff = false, Color? foreground, Color? inkColor, double? iconSize, TextStyle? textStyle, EdgeInsets padding = EdgeInsets.zero, BoxConstraints minimum = const BoxConstraints(), Size tapTarget = Size.zero, VoidCallback? onPressed, bool inert = false, bool selected = false, WidgetStatesController? statesController, bool reportsHover = false, bool showsHover = true, FocusOnKeyEventCallback? onKeyEvent, bool childFills = false, bool clipsChild = false, required Widget child})
const

Properties

child → Widget
final
childFills → bool
final
clipsChild → bool
final
fill → Color
final
foreground → Color?
Colors icons, and text in textStyle, easing along with fill.
final
hashCode → int
The hash code for this object.
no setterinherited
iconSize → double?
final
inert → bool
Ignores presses in the enabled colors, so toggling it animates nothing.
final
inkColor → Color?
The ink's content color where foreground is not the content's.
final
key → Key?
Controls how one widget replaces another widget in the tree.
finalinherited
look → PressLook
final
minimum → BoxConstraints
final
onKeyEvent → FocusOnKeyEventCallback?
final
onPressed → VoidCallback?
final
padding → EdgeInsets
final
reportsHover → bool
Whether a hover reaches statesController.
final
ringColor → Color?
final
ringStandsOff → bool
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
selected → bool
final
shape → OutlinedBorder
final
showsHover → bool
Whether a pointer resting on the surface shades it. A surface that shows no press leaves the hover to its owner as well.
final
side → BorderSide
Drawn round shape whenever the focus ring is not.
final
statesController → WidgetStatesController?
final
tapTarget → Size
final
textStyle → TextStyle?
final

Methods

createElement() → StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() → State<PressSurface>
Creates the mutable state for this widget at a given location in the tree.
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.
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

Operators

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