CarbonSkeletonText class

Placeholder lines for loading text.

One 16px line by default (24px with heading); paragraph renders lineCount lines whose widths vary with the upstream's fixed seed sequence — Carbon's "random" widths come from three hard-coded seeds, so the output is deterministic and matches the React renderer exactly.

Inheritance

Constructors

CarbonSkeletonText({Key? key, bool heading = false, bool paragraph = false, int lineCount = 3, double? width})
Creates skeleton text.
const

Properties

hashCode → int
The hash code for this object.
no setterinherited
heading → bool
Renders the taller 24px heading line instead of the 16px body line.
final
key → Key?
Controls how one widget replaces another widget in the tree.
finalinherited
lineCount → int
Number of lines when paragraph is set; defaults to 3 like upstream.
final
paragraph → bool
Renders lineCount lines instead of one.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
width → double?
Line width in logical pixels; null fills the available width.
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

Static Methods

lineWidth(double width, int index, {required bool fixed}) → double
The width of paragraph line index given the resolved full width, with fixed selecting the px-mode formula (explicit width) over the percent-mode one (fill width).
randomInt(int min, int max, int n) → int
Upstream's getRandomInt(min, max, n) — deterministic by seed index.

Constants

seeds → const List<double>
Upstream's fixed pseudo-random seeds (SkeletonText.tsx).