avataar_generator 1.1.1

  • Readme
  • Changelog
  • Example
  • Installing
  • 50

Avataar Generator in Dart #

A package to generate svg in Dart that produces awesome emojis. This package can be used with Angular Dart, Flutter etc.

Installation #

Add this to your project's pubspec.yaml

dependencies:  
 avataar_generator: any

Usage #

Anywhere you want the svg string.

getSvg(new Options())  

Options can be given different parameters.

Avatar Style #

  1. Circle
  2. Transparent

Top #

  1. No Hair
  2. Eye Patch
  3. Hat
  4. Hijab
  5. Turban
  6. Winter Hat 1
  7. Winter Hat 2
  8. Winter hat 3
  9. Winter hat 4
  10. Long hair big hair
  11. Long hair bob
  12. Long hair bun
  13. Long hair curly
  14. Long hair curvy
  15. Long hair dreads
  16. Long hair frida
  17. Long hair fro
  18. Long hair fro band
  19. Long hair not too long
  20. Long hair Shaved sides
  21. Long hair miawal lace
  22. Long hair straight
  23. Long hair straight 2
  24. Long hair straight strand
  25. Short hair dreads 01
  26. Short hair dreads 02
  27. Short hair frizzle
  28. Short hairs shaggy mullet
  29. Short hairs short curly
  30. Short hairs short flat
  31. Short hairs short round
  32. Short hairs short waved
  33. Short hair sides
  34. Short hair the caeser
  35. Short hair the caeser side part

Accessories #

  1. Blank
  2. Kurta
  3. Prescription01
  4. Prescription02
  5. Round
  6. Sunglasses
  7. Wayfarers

Hair Color #

  1. Aurburn
  2. Black
  3. Blonde
  4. BlondeGolden
  5. Brown
  6. BrownDark
  7. PastelPink
  8. Platinum
  9. Red
  10. SilverGray

HatColor #

  1. Black
  2. Blue01
  3. Blue02
  4. Blue03
  5. Gray01
  6. Gray02
  7. Heather
  8. PastelBlue
  9. PastelGreen
  10. PastelOrange
  11. PastelRed
  12. PastelYellow
  13. Pink
  14. Red
  15. White

FacialColor #

  1. Blank
  2. BeardMedium
  3. BeardLight
  4. BeardMajestic
  5. MoustacheFancy
  6. MoustacheMagnum

FacialHairColor #

  1. Aurburn
  2. Black
  3. Blonde
  4. BlondeGolden
  5. Brown
  6. BrownDark
  7. PastelPink
  8. Platinum
  9. Red
  10. SilverGray

Cloth #

  1. BlazerShirt
  2. BlazerSweater
  3. CollarSweater
  4. GraphicShirt
  5. Hoodie
  6. Overall
  7. ShirtCrewNeck
  8. ShirtScoopNeck
  9. ShirtVNeck

Eyes #

  1. Close
  2. Cry
  3. None
  4. Dizzy
  5. EyeRoll
  6. Happy
  7. Hearts
  8. Side
  9. Squint
  10. Surprised
  11. Wink
  12. WinkWhacky

EyeBrow #

  1. Angry
  2. AngryNatural
  3. None
  4. DefaultNatural
  5. FlatNatural
  6. RaisedExcited
  7. RaisedExcitedNatural
  8. SadConcerned
  9. SadConcernedNatural
  10. UpDown
  11. UpDownNatural

Mouth #

  1. Concerned
  2. None
  3. Disbelief
  4. eating
  5. Grimace
  6. Sad
  7. ScreamOpen
  8. Serious
  9. Smile
  10. Tongue
  11. Twinkle
  12. Vomit

Skin #

  1. Tanned
  2. Yellow
  3. Pale
  4. Light
  5. Brown
  6. DarkBrown
  7. Black

Face #

  1. Mouth
  2. Node
  3. Eyes
  4. EyeBrow

Graphic #

  1. Bat
  2. Cumbia
  3. Deer
  4. Diamond
  5. Hola
  6. Pizza
  7. Resist
  8. Selena
  9. Bear
  10. SkullOutline
  11. Skull

ClothColor #

  1. Black
  2. Blue01
  3. Blue02
  4. Blue03
  5. Gray01
  6. Gray02
  7. Heather
  8. PastelBlue
  9. PastelGreen
  10. PastelOrange
  11. PastelRed
  12. PastelYellow
  13. Pink
  14. Red
  15. White

1.0.0 #

  • Initial Version with all options

1.1.0 #

  • Added an example and README file for docs

1.1.1 #

  • Added more description and reformatted files.

example/main.dart

import 'package:avataar_generator/generator.dart';

void main() {
  print(getSvg(new Options()));
}

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  avataar_generator: ^1.1.1

2. Install it

You can install packages from the command line:

with pub:


$ pub get

with Flutter:


$ flutter pub get

Alternatively, your editor might support pub get or flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:avataar_generator/enums.dart';
import 'package:avataar_generator/generator.dart';
import 'package:avataar_generator/methods/accessories.dart';
import 'package:avataar_generator/methods/clothes.dart';
import 'package:avataar_generator/methods/colors.dart';
import 'package:avataar_generator/methods/face.dart';
import 'package:avataar_generator/methods/tops.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
0
Health:
Code health derived from static analysis. [more]
99
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100
Overall:
Weighted score of the above. [more]
50
Learn more about scoring.

We analyzed this package on Jan 14, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.7.0
  • pana: 0.13.4

Health issues and suggestions

Document public APIs. (-1 points)

271 out of 271 API elements have no dartdoc comment.Providing good documentation for libraries, classes, functions, and other API elements improves code readability and helps developers find and use your API.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0