FlutterBadge class
FlutterBadge class is needed to show some information about count
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- FlutterBadge
Constructors
- FlutterBadge({Key? key, required int itemCount, required Widget icon, bool hideZeroCount = true, Color badgeColor = Colors.red, Color badgeTextColor = Colors.white, double borderRadius = 0.0, BadgePosition? position, TextStyle? textStyle, EdgeInsets contentPadding = const EdgeInsets.all(5.0), double textSize = 12.0})
-
Constructor
key
is optional, default - trueitemCount
,icon
andposition
are required fieldshideZeroCount
is optional, default - truebadgeColor
is optional, default - redbadgeTextColor
is optional, default - whiteborderRadius
is optional, default - 0.0textStyle
is optional, default - nulltextSize
is optional, default - 12.0contentPadding
is optional, default - 5.0 for all sides
Properties
- badgeColor → Color
-
final
- badgeTextColor → Color
-
final
- borderRadius → double
-
final
- contentPadding → EdgeInsets
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- hideZeroCount → bool
-
final
- icon → Widget
-
final
- itemCount → int
-
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- position → BadgePosition?
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- textSize → double
-
final
- textStyle → TextStyle?
-
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → FlutterBadgeState -
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}) → 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