flutter_avatars_bottts 1.0.2 copy "flutter_avatars_bottts: ^1.0.2" to clipboard
flutter_avatars_bottts: ^1.0.2 copied to clipboard

outdated

Flutter Avatar - Bottts (high performance svg avatars rendering widget)

Flutter Avatars - Bottts #

license

A high performance Flutter Widget to render Bottts svg avatars on android/ios devices.

It's faster than other classical approaches because it's not using any API, rather it's rendering SVG strings on the fly !

Bottts : #

Characters Originally Designed by Pablo Stanley, the Sketch library can be found on bottts.com.

Getting Started #

  1. Create Bottt object:
// Create Bottt with default constructor
var _bottt = Bottt(
    color: Colors.red,
    eye: EyeType.Glow,
    face: FaceType.Square03,
    mouth: MouthType.Bite,
    side: SideType.Round,
    texture: TextureType.Dirty01,
    top: TopType.Horns,
);

// Randomize all properties
var _bottt = Bottt.random();

// Or keep some properties specific & remaining as random
var _bottt = Bottt.random(
  top: TopType.Horns,
  mouth: MouthType.Bite,
);
  1. Create AvataaarImage widget and pass it the avatar:
Padding(
    padding: EdgeInsets.all(20),
    child: BotttAvatar(_bottt),
)

// Alternatively you can also combine the widget with a CircleAvatar
CircleAvatar(
    radius: 90,
    child: CircleAvatar(
    radius: 85,
    backgroundColor: Color.fromARGB(255, 100, 100, 100),
    child: Padding(
        padding: EdgeInsets.all(20),
        child: BotttAvatar(_bottt),
    ),
    ),
)

Persisting bottts #

Use botttObject.toJson() and Bottt.fromJson(serializedBotttString) methods to serialize/deserialize bottts.

12
likes
30
pub points
0%
popularity

Publisher

unverified uploader

Flutter Avatar - Bottts (high performance svg avatars rendering widget)

Homepage
Repository (GitHub)
View/report issues

License

MIT (LICENSE)

Dependencies

flutter, flutter_svg, random_color

More

Packages that depend on flutter_avatars_bottts