Badge class
Display element at the corner of another element
- Inheritance
Constructors
- Badge.new({Key? key, Duration? duration, Curve? curve, BadgeTransitionBuilder transitionBuilder = BadgeTransition.scale, BadgeLayoutBuilder layoutBuilder = BadgeLayout.defaults, AlignmentGeometry? alignment, Offset? offset, BadgeStyle? style, String? content, required Widget child})
-
Create a badge widget
const
Properties
- alignment → AlignmentGeometry?
-
How to align the badge with the child.
final
- child → Widget
-
The widget below this widget in the tree.
final
- content → String?
-
The primary content of the badge.
final
- curve → Curve?
-
The curve to apply when animating the parameters of this widget.
final
- duration → Duration?
-
The duration over which to animate the parameters of this widget.
final
- hasContent → bool
-
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
-
Whether or not this badge is hidden.
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- layoutBuilder → BadgeLayoutBuilder
-
A function that wraps all of the children that are transitioning out, and the child that's transitioning in, with a widget that lays all of them out. This is called every time this widget is built. The function must not return null.
final
- offset → Offset?
-
Translate the badge with this offset.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- style → BadgeStyle?
-
The style to be applied to the badge.
final
- transitionBuilder → BadgeTransitionBuilder
-
A function that wraps a new content with an animation that transitions the content in when the animation runs in the forward direction and out when the animation runs in the reverse direction. This is only called when a new content is set (not for each build), or when a new transitionBuilder is set. If a new transitionBuilder is set, then the transition is rebuilt for the current content and all previous children using the new transitionBuilder. The function must not return null.
final
- visible → bool
-
no setter
Methods
-
build(
BuildContext context) → Widget -
Describes the part of the user interface represented by this widget.
override
-
createElement(
) → StatelessElement -
Creates a StatelessElement to manage this widget's location in the tree.
inherited
-
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
-
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