ZeroBadge class

Inheritance

Constructors

ZeroBadge.new({Key? key, ZeroBadgePosition position = ZeroBadgePosition.topRight, ZeroBadgeType type = ZeroBadgeType.standard, required Widget child, double childSize = 24, String? badgeText, VoidCallback? onTap, StackFit stackFit = StackFit.loose, Color? badgeColor, Color badgeTextColor = Colors.white, EdgeInsets? padding})
const

Properties

badgeColor Color?
The color that will be displayed on the badge indicator
final
badgeText String?
Allows for custom text on the badge indicator. Important, this indicator text only appears if the type is not ZeroBadgeType.dot
final
badgeTextColor Color
The color that will be displayed on the text of badge indicator
final
child Widget
The badge child, e.g. cart icon button.
final
childSize double
Important set this childSize if custom child, This childSize is taken from the width of the child.
final
hashCode int
The hash code for this object.
no setterinherited
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
onTap VoidCallback?
Will be called when you tap on the badge or child Important: if the badge is outside of the child the additional padding will be applied to make the full badge clickable
final
padding EdgeInsets?
The padding of child with indicator
final
position ZeroBadgePosition
Allows to set custom position of badge according to child.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
stackFit StackFit
Allows to edit fit parameter to Stack widget. The default value is StackFit.loose.
final
type ZeroBadgeType
Allows to set custom type of badge according to child.
final

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.
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