Avatar
A circular image component that displays user profile pictures with a fallback option. The Avatar component provides a consistent way to represent users in your application, displaying profile images with fallbacks to initials or icons when images are unavailable.
Overview
Preview
CLI
To generate and customize this style:
dart run forui style create avatarUsage
FAvatar(...)
FAvatar(
image: const NetworkImage('https://example.com/profile.jpg'),
style: (style) => style.copyWith(...),
size: 40.0,
semanticsLabel: 'User avatar',
fallback: const Text('JD'),
);FAvatar.raw(...)
FAvatar.raw(
child: const Text('MN'),
style: (style) => style.copyWith(...),
size: 40.0,
);Examples
Raw
Preview
Fallback
Preview
Last updated on