dice_bear
1.0.4, released 7 months ago by an unverified publisher
A Dart and Flutter wrapper for the DiceBear API to generate unique avatar profile pictures.
What it does
Provides a fully-typed wrapper for the DiceBear API to generate unique avatar profile pictures based on seeds. Supports 30+ avatar styles with style-specific customization and can output SVG URLs, rendered Flutter widgets, or raw SVG bytes.
AI-written summary of version 1.0.4, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need to generate unique, deterministic avatar profile pictures from user IDs or seeds.
- You want to use the DiceBear API with type safety and compile-time validation in Flutter.
Skip it when
- You need an offline-only avatar generation solution that does not rely on network requests or remote API fetching.
- You need to manipulate complex vector graphics beyond simple avatar rendering.
Strengths
- Full type safety with dedicated classes for each style option and compile-time validation.
- Supports 30+ unique DiceBear avatar styles and fine-grained customization.
- Flexible output options including SVG URLs, raw bytes, and direct Flutter widgets.
Weaknesses
- Relies on a network wrapper to fetch avatars from the DiceBear API.
- Limited to DiceBear avatar styles and options.
Setup
- Kind
- Flutter widgets
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 2
import 'package:dice_bear/dice_bear.dart';
final request = DiceBearRequest(
style: DiceBearStyle.adventurer,
coreOptions: DiceBearCoreOptions(
seed: 'john_doe',
),
);
Widget widget = request.toImage(width: 200, height: 200);Alternatives
Packages that do the same job and could replace dice_bear.
- avatar_plus
A versatile Flutter package for generating and displaying customizable avatars with random string content. Perfect for user profiles, placeholders, and more.
46Compare - random_avatar
Generate over 12 billion unique multicultural avatars and SVG widgets from strings.
50Compare
Works with
Packages commonly used together with dice_bear: ones it builds on, ones built on it, and its own family.