WxAvatar class
Display user profile image, initials or fallback icon
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatelessWidget
- WxAvatar
Constructors
-
WxAvatar.new({Key? key, bool animated = false, Curve? curve, Duration? duration, double? size, double? minSize, double? maxSize, OutlinedBorder? border, EdgeInsetsGeometry? margin, Clip? clipBehavior, Color? elevationColor, double? elevation, List<
BoxShadow> ? shadows, TextStyle? foregroundStyle, double? foregroundSize, Color? foregroundColor, double? foregroundOpacity, int? foregroundAlpha, Gradient? backgroundGradient, Color? backgroundColor, double? backgroundOpacity, int? backgroundAlpha, Color? borderColor, double? borderOpacity, int? borderAlpha, double? borderWidth, double? borderOffset, BorderStyle? borderStyle, BorderRadius? borderRadius, WxAvatarStyle? style, String? tooltip, ImageErrorListener? onBaseImageError, ImageErrorListener? onImageError, ImageProvider<Object> ? baseImage, ImageProvider<Object> ? image, Widget? child}) -
Create an avatar widget
const
-
WxAvatar.circle({Key? key, bool animated = false, Curve? curve, Duration? duration, double? radius, double? minRadius, double? maxRadius, EdgeInsetsGeometry? margin, Clip? clipBehavior, Color? elevationColor, double? elevation, List<
BoxShadow> ? shadows, TextStyle? foregroundStyle, double? foregroundSize, Color? foregroundColor, double? foregroundOpacity, int? foregroundAlpha, Gradient? backgroundGradient, Color? backgroundColor, double? backgroundOpacity, int? backgroundAlpha, Color? borderColor, double? borderOpacity, int? borderAlpha, double? borderWidth, double? borderOffset, BorderStyle? borderStyle, BorderRadius? borderRadius, WxAvatarStyle? style, String? tooltip, ImageErrorListener? onBaseImageError, ImageErrorListener? onImageError, ImageProvider<Object> ? baseImage, ImageProvider<Object> ? image, Widget? child}) -
Create an avatar widget with circle shape
const
Properties
- animated → bool
-
Whether to animate text style, icon theme, and other decoration on value changed.
final
- backgroundAlpha → int?
-
Alpha to be apply to backgroundColor.
final
- backgroundColor → Color?
-
Color to be used for the avatar's background.
final
- backgroundGradient → Gradient?
-
A gradient to use when filling the shape.
final
- backgroundOpacity → double?
-
Opacity to be apply to backgroundColor.
final
-
baseImage
→ ImageProvider<
Object> ? -
The background image of the circle. Changing the background
image will cause the avatar to animate to the new image.
final
- border → OutlinedBorder?
-
A border to draw.
final
- borderAlpha → int?
-
Alpha to be apply to borderColor.
final
- borderColor → Color?
-
Color to be used for the avatar's border.
final
- borderOffset → double?
-
The relative position of the stroke on a BorderSide in an
OutlinedBorder or Border.
final
- borderOpacity → double?
-
Opacity to be apply to borderColor.
final
- borderRadius → BorderRadius?
-
The radii for each corner of the avatar's border.
final
- borderStyle → BorderStyle?
-
The style of this side of the avatar's border.
final
- borderWidth → double?
-
The width of this side of the avatar's border, in logical pixels.
final
- child → Widget?
-
The widget below this widget in the tree.
final
- clipBehavior → Clip?
-
The avatar's content will be clipped (or not) according to this option.
final
- curve → Curve?
-
The curve to apply when animating the parameters of this widget.
final
- duration → Duration?
-
The duration over which to animate the parameters of this widget.
final
- effectiveStyle → WxAvatarStyle
-
no setter
- elevation → double?
-
The avatar's z-coordinate relative to the parent at which to place this physical object.
final
- elevationColor → Color?
-
When elevation is non zero the color to use for the avatar's shadow color.
final
- foregroundAlpha → int?
-
Alpha to be apply to foregroundColor.
final
- foregroundColor → Color?
-
The color to be applied to the avatar's label, icon, and checkmark
final
- foregroundOpacity → double?
-
Opacity to be apply to foregroundColor.
final
- foregroundSize → double?
-
Size to be apply to the Text or Icon.
final
- foregroundStyle → TextStyle?
-
The style to be applied to the avatar's label.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
-
image
→ ImageProvider<
Object> ? -
The foreground image of the circle.
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- margin → EdgeInsetsGeometry?
-
Empty space to surround the outside avatar widget.
final
- maxSize → double?
-
The maximum size of the avatar
final
- minSize → double?
-
The minimum size of the avatar
final
- onBaseImageError → ImageErrorListener?
-
An optional error callback for errors emitted when loading
baseImage.
final
- onImageError → ImageErrorListener?
-
An optional error callback for errors emitted when loading
image.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
shadows
→ List<
BoxShadow> ? -
A list of shadows cast by the border.
final
- size → double?
-
The size of the avatar
final
- style → WxAvatarStyle?
-
The style to be applied to the avatar.
final
- tooltip → String?
-
Tooltip string to be used for the body area of the button.
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