DrivenAnchorStyle class

Create a AnchorStyle that can handle widget event.

Inheritance
Implemented types

Constructors

DrivenAnchorStyle({EdgeInsetsGeometry? margin, EdgeInsetsGeometry? padding, BoxShape? shape, double? radius, BorderRadius? borderRadius, Color? overlayColor, double? overlayOpacity, bool? overlayDisabled, AnchorStyle? focusedStyle, AnchorStyle? hoveredStyle, AnchorStyle? pressedStyle, AnchorStyle? disabledStyle, bool? mergeResolved})
Default constructor for a driven AnchorStyle.
const
DrivenAnchorStyle.circle({EdgeInsetsGeometry? margin, EdgeInsetsGeometry? padding, double? radius, Color? overlayColor, double? overlayOpacity, bool? overlayDisabled, AnchorStyle? focusedStyle, AnchorStyle? hoveredStyle, AnchorStyle? pressedStyle, AnchorStyle? disabledStyle, bool? mergeResolved})
Create a circle shaped DrivenAnchorStyle.
const
DrivenAnchorStyle.from(AnchorStyle? enabled, {AnchorStyle? focusedStyle, AnchorStyle? hoveredStyle, AnchorStyle? pressedStyle, AnchorStyle? disabledStyle, bool? mergeResolved})
Create a DrivenAnchorStyle with value from another AnchorStyle.
DrivenAnchorStyle.rectangle({EdgeInsetsGeometry? margin, EdgeInsetsGeometry? padding, BorderRadius? borderRadius, Color? overlayColor, double? overlayOpacity, bool? overlayDisabled, AnchorStyle? focusedStyle, AnchorStyle? hoveredStyle, AnchorStyle? pressedStyle, AnchorStyle? disabledStyle, bool? mergeResolved})
Create a rectangle shaped DrivenAnchorStyle.
const
DrivenAnchorStyle.resolver(DrivenPropertyResolver<AnchorStyle?> resolver, {bool? mergeResolved = false})
Create a DrivenAnchorStyle from a resolver callback

Properties

borderRadius BorderRadius?
The clipping radius of the containing rect. This is effective only if the shape is BoxShape.circle.
finalinherited
disabledStyle AnchorStyle?
The style to be resolved when events includes AnchorEvent.disabled.
final
driven Map<WidgetEvent, AnchorStyle?>
Map of driven style, order matters
no setter
focusedStyle AnchorStyle?
The style to be resolved when events includes AnchorEvent.focused.
final
hashCode int
The hash code for this object.
no setterinherited
hoveredStyle AnchorStyle?
The style to be resolved when events includes AnchorEvent.hovered.
final
margin EdgeInsetsGeometry?
Empty space to surround the outside anchor.
finalinherited
mergeResolved bool?
Whether the resolved style is merged to the previous resolved style or not
final
overlayColor Color?
The overlay color of the anchor when pressed, hovered over, or focused.
finalinherited
overlayDisabled bool?
Whether the overlay is disabled or not
finalinherited
overlayEnabled bool
Whether the overlay is enabled or not
no setterinherited
overlayOpacity double?
The overlay opacity of the anchor when pressed, hovered over, or focused.
finalinherited
padding EdgeInsetsGeometry?
The padding between the contents of the anchor and the outside anchor.
finalinherited
pressedStyle AnchorStyle?
The style to be resolved when events includes AnchorEvent.pressed.
final
radius double?
The radius of the overlay. If the shape is BoxShape.circle.
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
shape BoxShape?
The shape (e.g., circle, rectangle) to use for the overlay drawn around this part of the anchor when pressed, hovered over, or focused.
finalinherited

Methods

copyWith({EdgeInsetsGeometry? margin, EdgeInsetsGeometry? padding, BoxShape? shape, double? radius, BorderRadius? borderRadius, Color? overlayColor, double? overlayOpacity, bool? overlayDisabled, bool? mergeResolved, AnchorStyle? focusedStyle, AnchorStyle? hoveredStyle, AnchorStyle? pressedStyle, AnchorStyle? disabledStyle}) DrivenAnchorStyle
Creates a copy of this AnchorStyle but with the given fields replaced with the new values.
override
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
override
merge(AnchorStyle? other) AnchorStyle
Creates a copy of this AnchorStyle but with the given fields replaced with the new values.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
resolve(Set<WidgetEvent> events) AnchorStyle
Returns a value of type T that depends on events.
override
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toMap() Map<String, dynamic>
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) String
A string representation of this object.
inherited
toStringShort() String
A brief description of this object, usually just the runtimeType and the hashCode.
inherited

Operators

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

Static Methods

evaluate(AnchorStyle? value, Set<WidgetEvent> events) AnchorStyle?
Resolves the value for the given set of events if value is an event driven AnchorStyle, otherwise returns the value itself.
override