Skip to main content
1

🖼️ Avatar Generation (DiceBear)

avatar({DiceBearStyle style, DiceBearImageType type, int? size, bool flip, String? backgroundColor})
String
Generates a DiceBear avatar URL using [this] string as the unique seed. The resulting URL can be used directly in an Image.network widget.
// Generates a 'bottts' style avatar using the user's ID as the seed.
Image.network('user_id_123'.avatar(
  style: DiceBearStyle.bottts,
  size: 150,
  backgroundColor: 'ffc0cb', // Pink background
));