AvataaarSkin class

Mixed in types
Implementers
Annotations
  • @freezed

Constructors

AvataaarSkin.black([@Default(Color(0x00614335)) @ColorSerialiser() Color color])
const
factory
AvataaarSkin.brown([@Default(Color(0x00D08B5B)) @ColorSerialiser() Color color])
const
factory
AvataaarSkin.custom([@Default(Colors.grey) @ColorSerialiser() Color color])
const
factory
AvataaarSkin.darkBrown([@Default(Color(0x00AE5D29)) @ColorSerialiser() Color color])
const
factory
AvataaarSkin.fromIndex(int index)
creates AvataaarSkin based on the index found in AvataaarSkin.all
factory
AvataaarSkin.fromJson(Map<String, dynamic> json)
factory
AvataaarSkin.light([@Default(Color(0x00EDB98A)) @ColorSerialiser() Color color])
const
factory
AvataaarSkin.pale([@Default(Color(0x00FFDBB4)) @ColorSerialiser() Color color])
const
factory
AvataaarSkin.random()
creates random AvataaarSkin
factory
AvataaarSkin.tanned([@Default(Color(0x00FD9841)) @ColorSerialiser() Color color])
const
factory
AvataaarSkin.yellow([@Default(Color(0x00F8D25C)) @ColorSerialiser() Color color])
const
factory

Properties

color Color
no setterinherited
copyWith → $AvataaarSkinCopyWith<AvataaarSkin>
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

map<TResult extends Object?>({required TResult tanned(AvataaarTypeSkinTanned value), required TResult yellow(AvataaarTypeSkinYellow value), required TResult pale(AvataaarTypeSkinPale value), required TResult light(AvataaarTypeSkinWhite value), required TResult brown(AvataaarTypeSkinBrown value), required TResult darkBrown(AvataaarTypeSkinDarkBrown value), required TResult black(AvataaarTypeSkinBlack value), required TResult custom(AvataaarTypeSkinCustom value)}) → TResult
inherited
mapOrNull<TResult extends Object?>({TResult tanned(AvataaarTypeSkinTanned value)?, TResult yellow(AvataaarTypeSkinYellow value)?, TResult pale(AvataaarTypeSkinPale value)?, TResult light(AvataaarTypeSkinWhite value)?, TResult brown(AvataaarTypeSkinBrown value)?, TResult darkBrown(AvataaarTypeSkinDarkBrown value)?, TResult black(AvataaarTypeSkinBlack value)?, TResult custom(AvataaarTypeSkinCustom value)?}) → TResult?
inherited
maybeMap<TResult extends Object?>({TResult tanned(AvataaarTypeSkinTanned value)?, TResult yellow(AvataaarTypeSkinYellow value)?, TResult pale(AvataaarTypeSkinPale value)?, TResult light(AvataaarTypeSkinWhite value)?, TResult brown(AvataaarTypeSkinBrown value)?, TResult darkBrown(AvataaarTypeSkinDarkBrown value)?, TResult black(AvataaarTypeSkinBlack value)?, TResult custom(AvataaarTypeSkinCustom value)?, required TResult orElse()}) → TResult
inherited
maybeWhen<TResult extends Object?>({TResult tanned(Color color)?, TResult yellow(Color color)?, TResult pale(Color color)?, TResult light(Color color)?, TResult brown(Color color)?, TResult darkBrown(Color color)?, TResult black(Color color)?, TResult custom(Color color)?, required TResult orElse()}) → TResult
inherited
next() AvataaarSkin
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
previous() AvataaarSkin
toIndex() int
returns the index of AvataaarSkin.all, or -1 if no entry is found
override
toJson() Map<String, dynamic>
inherited
toLabel([String languageCode = 'en']) String
based on languageCode and LocalizationStrings returns the label
override
toString() String
A string representation of this object.
inherited
toSvgPart() String
toSvgString(String maskID) String
Individual SVG Part, only usable with the whole Avataaar
when<TResult extends Object?>({required TResult tanned(Color color), required TResult yellow(Color color), required TResult pale(Color color), required TResult light(Color color), required TResult brown(Color color), required TResult darkBrown(Color color), required TResult black(Color color), required TResult custom(Color color)}) → TResult
inherited
whenOrNull<TResult extends Object?>({TResult tanned(Color color)?, TResult yellow(Color color)?, TResult pale(Color color)?, TResult light(Color color)?, TResult brown(Color color)?, TResult darkBrown(Color color)?, TResult black(Color color)?, TResult custom(Color color)?}) → TResult?
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

toHeader([String languageCode = 'en']) String
returns the header string based on the languageCode

Constants

all → const List<AvataaarSkin>