{"id":50382594,"url":"https://github.com/bramp/avatar_builder","last_synced_at":"2026-05-30T13:01:21.694Z","repository":{"id":345645822,"uuid":"1186788319","full_name":"bramp/avatar_builder","owner":"bramp","description":"Flutter widget that renders avataaars style avatars","archived":false,"fork":false,"pushed_at":"2026-04-04T00:11:03.000Z","size":14061,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-08T15:42:44.078Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://bramp.github.io/avatar_builder/","language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bramp.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null},"funding":{"github":"bramp","buy_me_a_coffee":"bramp"}},"created_at":"2026-03-20T01:46:30.000Z","updated_at":"2026-04-04T00:08:04.000Z","dependencies_parsed_at":"2026-03-20T18:01:12.831Z","dependency_job_id":null,"html_url":"https://github.com/bramp/avatar_builder","commit_stats":null,"previous_names":["bramp/flutter_avataaars","bramp/avatar_builder"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/bramp/avatar_builder","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bramp%2Favatar_builder","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bramp%2Favatar_builder/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bramp%2Favatar_builder/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bramp%2Favatar_builder/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bramp","download_url":"https://codeload.github.com/bramp/avatar_builder/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bramp%2Favatar_builder/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33692997,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-30T02:00:06.278Z","response_time":92,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-05-30T13:01:21.070Z","updated_at":"2026-05-30T13:01:21.687Z","avatar_url":"https://github.com/bramp.png","language":"Dart","funding_links":["https://github.com/sponsors/bramp","https://buymeacoffee.com/bramp"],"categories":[],"sub_categories":[],"readme":"# Avatar Builder\n\nA Flutter widget that renders customizable [avataaars](https://getavataaars.com/)-style cartoon avatars. Choose from 34 hairstyles, 12 eye styles, 13 eyebrow styles, 12 mouth styles, 9 clothing options, and more — or generate a random avatar with a single line of code.\n\n[![pub package](https://img.shields.io/pub/v/avatar_builder.svg)](https://pub.dev/packages/avatar_builder)\n[![Pub publisher](https://img.shields.io/pub/publisher/svg_path_transform.svg)](https://pub.dev/publishers/bramp.net/packages)\n[![Dart Analysis](https://github.com/bramp/svg_path/actions/workflows/dart.yml/badge.svg)](https://github.com/bramp/avatar_builder/actions/workflows/test.yml)\n[![License](https://img.shields.io/github/license/bramp/avatar_builder)](https://github.com/bramp/avatar_builder/blob/main/LICENSE)\n\n\u003ctable\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\u003cimg src=\"https://raw.githubusercontent.com/bramp/avatar_builder/main/assets/samples/sample_1.svg\" alt=\"avatar 1\" width=\"120\"\u003e\u003c/td\u003e\n    \u003ctd\u003e\u003cimg src=\"https://raw.githubusercontent.com/bramp/avatar_builder/main/assets/samples/sample_2.svg\" alt=\"avatar 2\" width=\"120\"\u003e\u003c/td\u003e\n    \u003ctd\u003e\u003cimg src=\"https://raw.githubusercontent.com/bramp/avatar_builder/main/assets/samples/sample_3.svg\" alt=\"avatar 3\" width=\"120\"\u003e\u003c/td\u003e\n    \u003ctd\u003e\u003cimg src=\"https://raw.githubusercontent.com/bramp/avatar_builder/main/assets/samples/sample_4.svg\" alt=\"avatar 4\" width=\"120\"\u003e\u003c/td\u003e\n    \u003ctd\u003e\u003cimg src=\"https://raw.githubusercontent.com/bramp/avatar_builder/main/assets/samples/sample_5.svg\" alt=\"avatar 5\" width=\"120\"\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\u003cimg src=\"https://raw.githubusercontent.com/bramp/avatar_builder/main/assets/samples/sample_6.svg\" alt=\"avatar 6\" width=\"120\"\u003e\u003c/td\u003e\n    \u003ctd\u003e\u003cimg src=\"https://raw.githubusercontent.com/bramp/avatar_builder/main/assets/samples/sample_7.svg\" alt=\"avatar 7\" width=\"120\"\u003e\u003c/td\u003e\n    \u003ctd\u003e\u003cimg src=\"https://raw.githubusercontent.com/bramp/avatar_builder/main/assets/samples/sample_8.svg\" alt=\"avatar 8\" width=\"120\"\u003e\u003c/td\u003e\n    \u003ctd\u003e\u003cimg src=\"https://raw.githubusercontent.com/bramp/avatar_builder/main/assets/samples/sample_9.svg\" alt=\"avatar 9\" width=\"120\"\u003e\u003c/td\u003e\n    \u003ctd\u003e\u003cimg src=\"https://raw.githubusercontent.com/bramp/avatar_builder/main/assets/samples/sample_10.svg\" alt=\"avatar 10\" width=\"120\"\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\n**[Live Demo](https://bramp.github.io/avatar_builder/)** · **[API Reference](https://pub.dev/documentation/avatar_builder/latest/)**\n\n## Features\n\n- **140+ SVG fragments** composable into millions of unique avatars\n- **Fully customizable**: hair, eyes, eyebrows, mouth, facial hair, clothing, accessories, skin color\n- **Random avatar generation** via `Avataaar.random()`\n- **Lightweight**: optimized SVG assets (~194 KB total)\n- **Built-in LRU cache** for fast rendering\n- **Circle or transparent** background styles\n- **Pixel-perfect fidelity** to the original [avataaars](https://github.com/fangpenlin/avataaars) React library\n\n## Getting started\n\nAdd `avatar_builder` to your `pubspec.yaml`:\n\n```yaml\ndependencies:\n  avatar_builder: ^0.3.1\n```\n\nThen run:\n\n```bash\nflutter pub get\n```\n\n## Usage\n\nImport the package:\n\n```dart\nimport 'package:avatar_builder/avatar_builder.dart';\n```\n\n### Display a random avatar\n\n```dart\nAvatarWidget(avatar: Avataaar.random())\n```\n\n### Display a specific avatar\n\n```dart\nAvatarWidget(\n  avatar: Avataaar(\n    topType: TopType.shortHairShortFlat,\n    accessoriesType: AccessoriesType.prescription01,\n    hairColor: HairColor.brown.color,\n    facialHairType: FacialHairType.blank,\n    clotheType: ClotheType.hoodie,\n    clotheColor: ClotheColor.blue01.color,\n    eyeType: EyeType.defaultEye,\n    eyebrowType: EyebrowType.defaultBrow,\n    mouthType: MouthType.smile,\n    skinColor: SkinColor.light.color,\n  ),\n)\n```\n\n### Customize the size\n\n```dart\nAvatarWidget(\n  avatar: Avataaar.random(),\n  size: 200,\n)\n```\n\n### Use a shared cache\n\n`AvatarWidget` uses `SvgCache.instance` by default to cache loaded SVG fragments in memory. You can also provide your own cache:\n\n```dart\nfinal cache = SvgCache(maxEntries: 256);\n\nAvatarWidget(\n  avatar: Avataaar.random(),\n  cache: cache,\n)\n```\n\n### Extract the SVG string\n\nUse `toSvg()` to get the composed SVG markup directly — useful for exporting, saving to a file, or server-side use:\n\n```dart\nfinal avatar = Avataaar(\n  topType: TopType.shortHairShortFlat,\n  eyeType: EyeType.happy,\n  mouthType: MouthType.smile,\n  skinColor: SkinColor.light.color,\n);\n\nfinal svgString = await avatar.toSvg(loadAsset: SvgCache.instance.load);\n// svgString contains a complete \u003csvg\u003e...\u003c/svg\u003e document\n// with all colors applied.\n```\n\n\u003e **For pure-Dart** (non-Flutter) use, see [`avatar_builder_core`](https://pub.dev/packages/avatar_builder_core) which includes a `FileAssetLoader` for `dart:io` environments.\n\n## Customization options\n\n| Category | Enum | Options |\n|----------|------|---------|\n| Style | [`AvatarStyle`](https://pub.dev/documentation/avatar_builder/latest/avatar_builder/AvatarStyle.html) | circle, transparent |\n| Hair / Hat | [`TopType`](https://pub.dev/documentation/avatar_builder/latest/avatar_builder/TopType.html) | 34 styles (long hair, short hair, hats, turbans, hijab, etc.) |\n| Hair color | [`HairColor`](https://pub.dev/documentation/avatar_builder/latest/avatar_builder/HairColor.html) | 12 colors |\n| Accessories | [`AccessoriesType`](https://pub.dev/documentation/avatar_builder/latest/avatar_builder/AccessoriesType.html) | 7 types (glasses, sunglasses, etc.) |\n| Facial hair | [`FacialHairType`](https://pub.dev/documentation/avatar_builder/latest/avatar_builder/FacialHairType.html) | 6 types |\n| Eyes | [`EyeType`](https://pub.dev/documentation/avatar_builder/latest/avatar_builder/EyeType.html) | 12 styles |\n| Eyebrows | [`EyebrowType`](https://pub.dev/documentation/avatar_builder/latest/avatar_builder/EyebrowType.html) | 13 styles |\n| Mouth | [`MouthType`](https://pub.dev/documentation/avatar_builder/latest/avatar_builder/MouthType.html) | 12 styles |\n| Clothing | [`ClotheType`](https://pub.dev/documentation/avatar_builder/latest/avatar_builder/ClotheType.html) | 9 types |\n| Clothing color | [`ClotheColor`](https://pub.dev/documentation/avatar_builder/latest/avatar_builder/ClotheColor.html) | 15 colors |\n| Graphic (on shirts) | [`GraphicType`](https://pub.dev/documentation/avatar_builder/latest/avatar_builder/GraphicType.html) | 11 designs |\n| Skin | [`SkinColor`](https://pub.dev/documentation/avatar_builder/latest/avatar_builder/SkinColor.html) | 7 tones |\n\n## Example app\n\nA full interactive example is available in the [`example/`](example/) directory and deployed as a **[live demo](https://bramp.github.io/avatar_builder/)**.\n\nTo run it locally:\n\n```bash\ncd example\nflutter run -d chrome\n```\n\n## Contributing\n\nContributions are welcome! See [DEVELOPMENT.md](DEVELOPMENT.md) for how the SVG data is generated and how to work on the package.\n\n## Credits\n\nBased on [avataaars-generator](https://github.com/fangpenlin/avataaars-generator) by [Fang-Pen Lin](https://github.com/fangpenlin), using avatar artwork by [Pablo Stanley](https://getavataaars.com/).\n\n## License\n\nBSD 2-Clause License — see [LICENSE](LICENSE) for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbramp%2Favatar_builder","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbramp%2Favatar_builder","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbramp%2Favatar_builder/lists"}