CKBadge class
Badge component for displaying labels, counts, and status indicators.
The default appearance is primary. Use named constructors for semantic variants:
CKBadge(label: 'Featured') // primary (default)
CKBadge.success(label: 'Approved')
CKBadge.warning(label: 'Pending')
CKBadge.error(label: 'Failed')
- Inheritance
Constructors
- CKBadge({required String label, BadgeVariant variant = BadgeVariant.primary, Key? key})
-
Primary badge (default, recommended appearance).
const
- CKBadge.away({required String label, Key? key})
-
Away status badge.
const
- CKBadge.beta({required String label, Key? key})
-
Beta badge variant (beta program).
const
- CKBadge.busy({required String label, Key? key})
-
Busy status badge.
const
- CKBadge.draft({required String label, Key? key})
-
Draft badge variant (work in progress).
const
- CKBadge.error({required String label, Key? key})
-
Error badge variant (critical, failed).
const
- CKBadge.info({required String label, Key? key})
-
Info badge variant (informational).
const
- CKBadge.live({required String label, Key? key})
-
Live badge variant (currently active).
const
- CKBadge.offline({required String label, Key? key})
-
Offline status badge.
const
- CKBadge.online({required String label, Key? key})
-
Online status badge.
const
- CKBadge.outline({required String label, Key? key})
-
Outline badge variant (bordered, minimal).
const
- CKBadge.outlineError({required String label, Key? key})
-
Outline error badge variant.
const
- CKBadge.outlineSuccess({required String label, Key? key})
-
Outline success badge variant.
const
- CKBadge.pro({required String label, Key? key})
-
Pro badge variant (premium feature).
const
- CKBadge.success({required String label, Key? key})
-
Success badge variant (positive, approved).
const
- CKBadge.warning({required String label, Key? key})
-
Warning badge variant (caution, pending).
const
- CKBadge.newBadge({required String label, Key? key})
-
New badge variant (new feature/item).
const
Properties
- 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
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- variant → BadgeVariant
-
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