SeniorBadge class

Inheritance

Constructors

SeniorBadge({Key? key, required Color backgroundColor, required Color fontColor, required String label, SeniorBadgeShape shape = SeniorBadgeShape.chip, bool outlined = false, dynamic value, dynamic onSelect(dynamic)?, bool disabled = false, Color? disabledBackgroundColor, Color? disabledFontColor, int? count, Color? selectedBackgroundColor, Color? selectedFontColor, Color counterColor = SeniorColors.grayscale80, Color couterBackgroundColor = SeniorColors.grayscale30})
Creates an Badge component. The backgroundColor, fontColor and label parameters are required.
SeniorBadge.icon({required Color backgroundColor, required Color fontColor, required String label, SeniorBadgeShape shape, bool outlined, dynamic value, dynamic onSelect(dynamic)?, bool disabled, Color disabledBackgroundColor, Color disabledFontColor, int count, Color selectedBackgroundColor, Color selectedFontColor, Color counterColor, Color couterBackgroundColor, Color selectedIconColor, required IconData icon, Color iconColor, Color disabledIconColor, SeniorBadgeIconPosition iconPosition})
Creates an Badge with icon component. The backgroundColor, fontColor, label, onSelect parameters are required.
factory

Properties

backgroundColor Color
Defines the background color of the badge.
final
count int?
A counter that is displayed to the right of the badge content.
final
counterColor Color
Defines the font color of the badge counter.
final
couterBackgroundColor Color
Defines the background color of the badge counter.
final
disabled bool
Defines if the badge will be disabled. The default value is false.
final
disabledBackgroundColor Color?
Defines the background color of the badge when it is disabled. If this parameter is not informed, there will be no distinction in the background color of the badge when enabled and disabled.
final
disabledFontColor Color?
Defines the font color of the badge's label when it is disabled. If this parameter is not informed, there will be no distinction in the font color of the badge when enabled and disabled.
final
fontColor Color
Defines the font color of the badge's label when it is disabled.
final
hashCode int
The hash code for this object.
no setterinherited
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
label String
The text that is displayed on the badge.
final
onSelect → (dynamic Function(dynamic)?)
Function executed when the badge is selected. Returns the stored value.
final
outlined bool
Defines whether the badge will have a line around it.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
selectedBackgroundColor Color?
Defines the color of the bag when it is selected.
final
selectedFontColor Color?
Defines the font color of the badge when it is selected.
final
shape SeniorBadgeShape
Defines the format of the badge, which can be Senior Badge Shape.chip and SeniorBadgeShape.pill.
final
value → dynamic
A value that the badge element will represent.
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() State<SeniorBadge>
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