TencentCloudChatAvatar class
A customizable avatar widget that can display one or multiple images.
The TencentCloudChatUIKitAvatar widget is designed to display user avatars in a chat application. It supports displaying a single image or multiple images in a grid layout. The widget can handle both local file paths and online image URLs.
The widget provides customization options for width, height, border radius, and decoration.
Example usage:
TencentCloudChatUIKitAvatar(
width: 48,
height: 48,
borderRadius: 8,
imageList: [
'https://example.com/sample-image-1.jpg',
'https://example.com/sample-image-2.jpg',
'https://example.com/sample-image-3.jpg',
],
)
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- TencentCloudChatAvatar
Constructors
-
TencentCloudChatAvatar({Key? key, double? width, double? height, double? borderRadius, required List<
String?> imageList, Decoration? decoration, required TencentCloudChatAvatarScene scene}) -
const
Properties
- borderRadius → double?
-
The border radius of the avatar.
Defaults to 8.
final
- decoration → Decoration?
-
The decoration to container where there are multiple images provided.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- height → double?
-
The total height of the avatar.
Defaults to 48.
final
-
imageList
→ List<
String?> -
A list of image paths (local or online) to be displayed as avatars.
The list must contain at least 1 and at most 9 items.
Each item in the list can be a local file path or an online image URL.
final
- 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
- scene → TencentCloudChatAvatarScene
-
final
- width → double?
-
The total width of the avatar.
Defaults to 48.
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< TencentCloudChatAvatar> -
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, 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