flutter_avatars_bottts 1.0.3

Flutter Android iOS

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 BotttAvatar widget and pass it the bottt object:
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),
    ),
    ),
)

Serialization/Deserialization #

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

For Strings: Use botttObject.serialize() and Bottt.deserialize()(serializedBotttString) methods to serialize/deserialize bottts.

4
likes
80
pub points
45%
popularity

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

Homepage
Repository (GitHub)
View/report issues

Documentation

API reference

Uploader

abhijatsaxena@gmail.com

License

MIT (LICENSE)

Dependencies

flutter, flutter_svg, random_color

More

Packages that depend on flutter_avatars_bottts