Package selection guidance compiled from public package information, community data, and project usage.
DiceBear is a Flutter/Dart package that wraps the DiceBear API, enabling developers to generate unique, random avatar profile pictures. It supports multiple styles and customization options, making it ideal for user profiles, chat interfaces, and social apps. The package works across all major platforms including Android, iOS, Web, macOS, Windows, and Linux. With simple integration via pub add, it provides a seamless way to enhance UI with personalized avatars.
Use cases
User profile images
Chat head avatars
Social media app UIs
Dashboard user indicators
Game player avatars
Key features
Random avatar generation
Multiple avatar styles
Customizable appearance
Cross-platform support
Easy integration via pub
API-powered design
Suitable for
App developers seeking quick avatars
Designers needing consistent avatars
Chat or social apps
Prototyping with realistic user visuals
Projects requiring minimal setup
Considerations
Requires internet access for avatar generation
Limited to predefined DiceBear styles
Dependent on external API availability
No offline avatar generation
Style customization limited by API constraints
Original README
Original README snapshot from the linked source repository. Visit the repository for the latest content.
dice_bear Flutter Package
A fully-typed Dart/Flutter wrapper for the DiceBear API (v9.x) that generates unique avatar profile pictures with extensive customization options.
DiceBear is an avatar library for designers and developers. Generate random, deterministic avatar profile pictures from seeds, supporting 30+ unique art styles with fine-grained style-specific customization.
✨ Full Type Safety — Every style option is a dedicated Dart class with compile-time validation
🎯 30+ Avatar Styles — Support for all DiceBear styles including Adventurer, Avataaars, PixelArt, and more
🔧 Style-Specific Customization — Each style has its own set of customization options (eyes, mouth, accessories, etc.)
📦 Flexible Output — Get SVG URLs, rendered Flutter widgets, or raw SVG bytes
🎲 Deterministic & Random — Generate consistent avatars from a seed or random ones each time
Installation
Add to your pubspec.yaml:
dependencies:dice_bear:^1.0.0
Then run flutter pub get.
Quick Start
Basic Usage
import'package:dice_bear/dice_bear.dart';
// Create a simple avatar requestfinal request = DiceBearRequest(
style: DiceBearStyle.adventurer,
coreOptions: DiceBearCoreOptions(
seed: 'john_doe', // Deterministic: same seed = same avatar
),
);
// Render as Flutter widgetWidget widget = request.toImage(width: 200, height: 200);
// Get the SVG URLUri svgUrl = request.uri;
// Get raw SVG bytesUint8List? svgBytes = await request.fetchBytes();
Random Avatar
// Generate a new random avatar each timefinal request = DiceBearRequest(
style: DiceBearStyle.random,
coreOptions: DiceBearCoreOptions(
seed: DateTime.now().millisecondsSinceEpoch.toString(),
),
);
Advanced Usage
Style-Specific Customization
Each DiceBear style has its own options class for fine-grained control: