seed_avatar 0.0.1 copy "seed_avatar: ^0.0.1" to clipboard
seed_avatar: ^0.0.1 copied to clipboard

A Flutter package to easily generate and display unique avatars based on a seed string using the DiceBear API.

Seed Avatar #

A Flutter package to easily generate and display unique avatars based on a seed string using the DiceBear API.

pub package

Features #

  • Effortless Avatar Generation: Create unique avatars from any string (e.g., username, email).
  • Multiple Avatar Styles: Supports various DiceBear avatar styles, including adventurer, adventurerNeutral, avataaars, avataaarsNeutral, bigEars, bigEarsNeutral, bigSmile, bottts, croodles, croodlesNeutral, identicon, initials, micah, miniavs, notionists, openPeeps, and personas.
  • Customizable Size: Control the size of the generated avatar.
  • Simple Integration: Easy to use with minimal code required.
  • Cached Image: The generated avatar is cached for better performance.

Installation #

Add seed_avatar to your pubspec.yaml file:

dependencies:
  seed_avatar: ^latest_version

Usage #

import 'package:seed_avatar/seed_avatar.dart';

Example #


class MyHomePage extends StatefulWidget {
  const MyHomePage({super.key, required this.title});

  final String title;

  @override
  State<MyHomePage> createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        backgroundColor: Theme.of(context).colorScheme.inversePrimary,
        title: Text(widget.title),
      ),
      body: Center(
        child: SeedAvatar(
          seed: 'demo@example.com',
          style: AvatarStyle.notionists,
          size: 256.0,
        ),
      ),
    );
  }
}
0
likes
160
points
34
downloads

Publisher

verified publisherredlinesoft.net

Weekly Downloads

A Flutter package to easily generate and display unique avatars based on a seed string using the DiceBear API.

Repository (GitHub)

Documentation

API reference

License

MIT (license)

Dependencies

flutter, flutter_svg

More

Packages that depend on seed_avatar