LitUserIcon class

A widget displaying an username on a colored background.

The username will be converted into an acronym to keep the displayed text as short as possible. The username is split on each space character.

Inheritance

Constructors

LitUserIcon({Key? key, double size = 96.0, Color primaryColor = Colors.white, Color contrastColor = Colors.white, String username = "Some One", List<BoxShadow> boxShadow = const [const BoxShadow(blurRadius: 4.0, color: Colors.black12, offset: Offset(-3.0, 2.0), spreadRadius: -1.0)], BorderRadius borderRadius = const BorderRadius.all(const Radius.circular(38.0)), double fontSize = 34.0, void onPressed()?, EdgeInsets margin = const EdgeInsets.symmetric(horizontal: 8.0)})
Creates a LitUserIcon.
const

Properties

borderRadius BorderRadius
The container's border radius.
final
boxShadow List<BoxShadow>
The container's box shadow.
final
contrastColor Color
The contrasting color used to generate the gradient background.
final
fontSize double
The text font size.
final
hashCode int
The hash code for this object.
no setterinherited
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
margin EdgeInsets
The margin surrounding the text.
final
onPressed → (void Function()?)
Called once the container has been pressed.
final
primaryColor Color
The primary color used to generate the gradient background.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
size double
The size which accounts for both, width and height.
final
username String
The displayed username, whose text is converted into an acronym.
final

Methods

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