StreamUserAvatar class
Displays a user's avatar.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatelessWidget
- StreamUserAvatar
Constructors
- StreamUserAvatar({Key? key, required UserInfo user, bool selected = false, OnUserAvatarTap? onTap, OnUserAvatarLongPress? onLongPress, ImageWidgetBuilder? imageBuilder, PlaceholderWidgetBuilder? placeholderBuilder, ErrorWidgetBuilder? errorBuilder, FallbackWidgetBuilder? fallbackBuilder, BoxConstraints? constraints, BorderRadius? borderRadius, TextStyle? initialsTextStyle, Color? initialsBackground, Color? selectionColor, double? selectionThickness})
-
Creates a new instance of StreamUserAvatar.
const
Properties
- borderRadius → BorderRadius?
-
BorderRadius of the image.
final
- constraints → BoxConstraints?
-
Sizing constraints of the avatar.
final
- errorBuilder → ErrorWidgetBuilder?
-
Builder function used to build an error widget.
final
- fallbackBuilder → FallbackWidgetBuilder?
-
Builder function used to build a widget with the user initials.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- imageBuilder → ImageWidgetBuilder?
-
Builder function used to build an image widget for the user avatar.
final
- initialsBackground → Color?
-
Background color for the initials.
final
- initialsTextStyle → TextStyle?
-
TextStyle for the initials text.
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- onLongPress → OnUserAvatarLongPress?
-
The action to perform when the user avatar is long-pressed.
final
- onTap → OnUserAvatarTap?
-
The action to perform when the user avatar is tapped.
final
- placeholderBuilder → PlaceholderWidgetBuilder?
-
Builder function used to build a placeholder widget.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- selected → bool
-
Flag for if avatar is selected. Defaults to
false
.final - selectionColor → Color?
-
Color of the selection.
final
- selectionThickness → double?
-
Selection thickness around the avatar.
final
- user → UserInfo
-
User whose avatar is to be displayed.
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.
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