DiceBear는 DiceBear API를 래핑하는 Flutter/Dart 패키지로, 개발자가 고유하고 무작위의 프로필 아바타 이미지를 생성할 수 있도록 해줍니다. 다양한 스타일과 맞춤 설정 옵션을 지원하여 사용자 프로필, 채팅 인터페이스, 소셜 앱에 이상적입니다. Android, iOS, Web, macOS, Windows, Linux 등 모든 주요 플랫폼에서 작동합니다. pub add를 통해 간편하게 통합할 수 있으며, 개인화된 아바타로 UI를 원활하게 강화할 수 있습니다.
사용 사례
사용자 프로필 이미지
채팅 헤드 아바타
소셜 미디어 앱 UI
대시보드 사용자 지표
게임 플레이어 아바타
주요 기능
랜덤 아바타 생성
다양한 아바타 스타일
사용자 정의 가능한 외관
크로스 플랫폼 지원
pub를 통한 간편한 통합
API 기반 디자인
적합한 대상
빠른 아바타를 찾는 앱 개발자
일관된 아바타가 필요한 디자이너
채팅 또는 소셜 앱
현실적인 사용자 시각을 활용한 프로토타이핑
최소한의 설정이 필요한 프로젝트
고려 사항
아바타 생성을 위해 인터넷 연결이 필요합니다
사전 정의된 DiceBear 스타일로 제한됨
외부 API 사용 가능 여부에 따라 다름
오프라인 아바타 생성 없음
스타일 사용자 정의는 API 제약으로 인해 제한됨
원본 README
연결된 소스 저장소의 README 원문 스냅샷입니다. 최신 내용은 저장소에서 확인하세요.
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: