ExpressiveAvatar class
A person's or an entity's face in a small fixed shape: the photo in
slotId when given (the initials standing in while it is pending or
missing), else icon when given, else the initials of name — on a
tone's container: tone, or when that is null the tone name always
picks, so a list of people is varied and each person keeps a colour
(ExpressiveMediaTone.primary is Material's list avatar exactly).
The shape is a circle (ListTokens.ItemLeadingAvatarShape, corner
full); shape masks it with a library shape instead — a hero moment,
which asserts an ExpressiveHeroMoment ancestor. Announced as an image of
name.
ExpressiveAvatar(name: 'Mara Quist', slotId: 'face-mara', size: ExpressiveAvatarSize.large)
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatelessWidget
- ExpressiveAvatar
Constructors
- ExpressiveAvatar({required String name, String? slotId, IconData? icon, ExpressiveAvatarSize size = ExpressiveAvatarSize.medium, ExpressiveMediaTone? tone, ExpressiveMaterialShape? shape, ExpressiveComponentThemeData? style, Key? key})
-
An avatar for
name, showing the photo inslotIdoriconwhen given.const
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- icon → IconData?
-
A glyph in place of the initials (an entity, an unknown person).
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- name → String
-
Whose face this is: its initials, and what a screen reader says.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- shape → ExpressiveMaterialShape?
-
A library shape mask in place of the circle (a hero moment).
final
- size → ExpressiveAvatarSize
-
The avatar's size.
final
- slotId → String?
-
The declared media slot of the photo, if any.
final
- style → ExpressiveComponentThemeData?
-
Stateful visual overrides before the avatar theme.
final
- tone → ExpressiveMediaTone?
-
The container family; the one name picks when null.
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.
override
-
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
-
initialsOf(
String name) → String -
The initials
nameprints: the first letter of each of its first two words, upper-cased.