AvatarRenderBase class abstract

Shared structural base for themed avatar renderers.

Factors the consistent build skeleton shared by every theme's avatar renderer (the root container element, its inline styles, the optional tap handler, and the body-then-optional-status child assembly) into one place. A concrete theme renderer supplies the root/status CSS classes and inline style maps as value members.

The avatar body diverges structurally between themes: ShadCN renders the image/initials fallback flat inside the root, while Neon and Neubrutalism wrap that content in an inner element. That divergent sub-tree is therefore produced by the abstract buildBody escape hatch rather than a value map.

This base lives in core and depends only on core props; it must never depend on a theme package.

Inheritance

Constructors

AvatarRenderBase(AvatarProps props, {Key? key})
const

Properties

hashCode int
The hash code for this object.
no setterinherited
key Key?
Controls how one component replaces another component in the tree.
finalinherited
props AvatarProps
final
rootClass String
CSS class applied to the root container element.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
statusClass String
CSS class applied to the status indicator element.
no setter

Methods

build(BuildContext context) Component
Describes the part of the user interface represented by this component.
override
buildBody(AvatarProps props) Component
Builds the avatar body (image or initials fallback). This sub-tree differs structurally per theme, so it is produced here rather than value-mapped.
createElement() Element
Creates a StatelessElement to manage this component's location in the tree.
inherited
decorationStyles(ArcaneDecoration? decoration) Map<String, String>
Per-instance decoration overrides. Default: none. Themes translate an ArcaneDecoration into their own CSS; unimplemented fields are ignored.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
rootStyles(AvatarProps props) Map<String, String>
Inline styles for the root container element.
shouldRebuild(covariant Component newComponent) bool
Implement this method to determine whether a rebuild can be skipped.
inherited
statusStyles(AvatarProps props) Map<String, String>
Inline styles for the status indicator element.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited