flutter_notion_avatar 0.0.3 copy "flutter_notion_avatar: ^0.0.3" to clipboard
flutter_notion_avatar: ^0.0.3 copied to clipboard

An flutter widget plugin notion-style avatars

Notion Avatar Widget #

Flutter Widget plugin for generating and displaying Notion Avatars.

This plugin is written simply for use with ToyProject. There is still a lot of work to be done, so if you have any additions or issues, please leave them on Github/issues.

Usage Preview
Wrap the NotionAvatar widget inside a SizedBox(or Widget) to specify the size. Use the `useRandom` property to generate a random avatar.
SizedBox(
  width: 300,
  height: 300,
  child: NotionAvatar(
    useRandom: true,
    onCreated: (NotionAvatarController controller) {
      this.controller = controller;
    },
  ),
)

Controller Methods #

The NotionAvatarController provides the following methods to control the avatar:

  • random(): Generates a random avatar.
  • setAccessories(int index): Sets the accessories of the avatar.
  • setEyes(int index): Sets the eyes of the avatar.
  • setEyebrows(int index): Sets the eyebrows of the avatar.
  • setFace(int index): Sets the face of the avatar.
  • setGlasses(int index): Sets the glasses of the avatar.
  • setHair(int index): Sets the hair of the avatar.
  • setMouth(int index): Sets the mouth of the avatar.
  • setNose(int index): Sets the nose of the avatar.
  • setDetails(int index): Sets the details of the avatar.

Styles #

Accessories

accessories

Accessories can be customized using the NotionAvatarController's setAccessories() method.

Beard

beard

Beard styles can be customized using the NotionAvatarController's setDetails() method.

Details

details

Details can be customized using the NotionAvatarController's setDetails() method.

Eyebrows

eyebrows

Eyebrow styles can be customized using the NotionAvatarController's setEyebrows() method.

Eyes

eyes

Eye styles can be customized using the NotionAvatarController's setEyes() method.

Face

face

Face styles can be customized using the NotionAvatarController's setFace() method.

Glasses

glasses

Glasses styles can be customized using the NotionAvatarController's setGlasses() method.

Hair

hair

Hair styles can be customized using the NotionAvatarController's setHair() method.

Mouth

mouth

Mouth styles can be customized using the NotionAvatarController's setMouth() method.

Nose

nose

Nose styles can be customized using the NotionAvatarController's setNose() method.

Assets #