shadcn_ui-avatar

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Shadcn UI — Avatar

Shadcn UI — 头像组件

Instructions

使用说明

ShadAvatar
is an image with a placeholder for representing the user. Uses the
universal_image
package for multiple image formats.
ShadAvatar
是一个带占位符的用户头像组件,使用
universal_image
包支持多种图片格式。

Basic usage

基础用法

dart
ShadAvatar(
  'https://example.com/avatar.png',
  placeholder: Text('CN'),
)
Pass the image URL as the first argument;
placeholder
is shown while loading or if the image fails (e.g. initials).
dart
ShadAvatar(
  'https://example.com/avatar.png',
  placeholder: Text('CN'),
)
将图片URL作为第一个参数传入;当图片加载中或加载失败时(例如显示首字母),会展示
placeholder
内容。