TinyAvatar class

A TinyAvatar widget

The avatar is generated from the baseString. This generation gives the appearance of randomness but will always be the same for the same base string.

Inheritance

Constructors

TinyAvatar({Key? key, required String baseString, TinyAvatarColourScheme colourScheme = TinyAvatarColourScheme.froggy, List<Color>? customColours, Clip clip = Clip.antiAlias, required double dimension, bool? circular, double? borderRadius})
const

Properties

baseString String
The base string to generate the avatar from. For best results, use a string with 5+ characters.
final
borderRadius double?
The border radius of the avatar. If not set, the avatar will be a square. Incompatible with circular
final
circular bool?
If true, the avatar will be completely rounded. By default, the avatar will be a square. Incompatible with borderRadius
final
clip Clip
The clip of the avatar. Defaults to Clip.antiAlias.
final
colourScheme TinyAvatarColourScheme
The colour scheme of the avatar.
final
customColours List<Color>?
Supplies the avatar with a custom custom set of colours. If this is not null, the colourScheme will be ignored.
final
dimension double
The width and height of the avatar
final
hashCode int
The hash code for this object.
no setterinherited
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

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}) 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