Buscar pacotes, repositórios e categorias de apps

Repositório GitHubfrananleo/flutter_avataaar

flutter_avataaar

frananleo/flutter_avataaar open-source repository details.

Capa do projeto flutter_avataaar
Estrelas
13
Forks
11
Último push (UTC)
15 de jun. de 2023
Status do projeto
Ativo

README original

Texto original em inglês. Visite o GitHub para a versão atual.

Flutter_avataaar

Flutter wrapper widget for Avataaars API - a free online avatar generator for anyone to make their beautiful personal avatar easily.

flutter-avataaar

Getting Started

  1. Create Avataaar object:
// Create avatar with default constructor
Avataaar(
  skin: Skin.pale,
  top: Top(
    topType: TopType.longHairCurvy,
    accessoriesType: AccessoriesType.Round,
    facialHair: FacialHair.beardMagestic(
      facialHairColor: FacialHairColor.BlondeGolden,
    ),
  ),
);

// Randomize all properties
Avataaar.random();

// Or mix both
Avataaar.random(
  skin: Skin.pale,
  top: Top(
    topType: TopType.longHairCurvy,
    accessoriesType: AccessoriesType.Round,
    facialHair: FacialHair.random,
  ),
);
  1. Create AvataaarGenerator widget and pass it the avatar:
AvataaarGenerator
(
  avataaar: avataaar,
  onTranslateKey: (String key) {
  return Translate.get(key);
  }
  onUpdateAvataaar:() {setState((){});},
);

// By default package will use SvgPicture to render the image. AvataaarPicture could be used to create a custom
// [builder] constructor and create widget for given image url:
 AvataaarPicture.builder(
  builder: (context, avataaar) {
    // ...
  },
)
Persisting avatars

Use Avataaar.toJson() and Avataaar.fromJson(String) methods to serialize/deserialize avatars.

Getting image bytes

Use the funtion getPngFromSvg from the class Avataaar to get the png File.

Francisco Gonzalez-Anleo GitHub avatar
Autor no GitHub

Francisco Gonzalez-Anleo ↗

Germany
LinguagensDartHTMLRubySwiftKotlinObjective-C

Pacotes publicados por este repositório

Dependências usadas

Lista de dependências 9 itens

Como escolher um repositório para seu projeto?

Filtre pelo caso de uso, compare a atividade e confira o projeto original antes de adotá-lo.

  1. Busque por nome, autor ou descrição e filtre por tema.
  2. Compare estrelas, forks e envios recentes. Estrelas indicam interesse, mas não garantem qualidade.
  3. Confira o README, a licença e as issues no GitHub antes de usar o projeto.

Fontes e manutenção

“A repository is the most basic element of GitHub.”

GitHub Docs — About repositories ↗