avatars
3.0.2, released 5 years ago by albertofecchi.com
A Flutter widget that shows avatars with fallback to images, initials or custom text.
What it does
The Avatar widget picks the best available source among social image providers, network or asset images, and text (name initials or custom value). It falls back automatically if a source fails and can cache remote images.
AI-written summary of version 3.0.2, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need an avatar that can try multiple image sources and fall back to initials.
- You want built‑in caching for remote avatar images.
- You require easy shape and style customization for avatars.
Skip it when
- You only need a simple image widget without fallback logic.
- You need support for social platforms not listed (e.g., Twitter).
- You require advanced image editing or transformations.
Strengths
- Automatic priority & fallback among many sources
- Built‑in caching via flutter_cache_manager
- Customizable shape, colors, border, loader
Weaknesses
- Limited to the provided social sources
- No support for custom network error handling beyond fallback
- No code‑generation or advanced image processing features
Setup
- Kind
- Flutter widgets
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 2
import 'package:avatars/avatars.dart';
Avatar(
name: 'Alberto Fecchi',
sources: [GitHubSource('luckyseven')],
shape: AvatarShape.circle(40),
);Alternatives
Packages that do the same job and could replace avatars.
- cached_network_image
Provides robust caching for network images without the extra avatar fallback logic.
91Compare - octo_image
Offers placeholder and error widget handling for images, useful if you only need simple fallback.
94Compare
Works with
Packages commonly used together with avatars: ones it builds on, ones built on it, and its own family.