MBColorElement constructor
Initializes a color element with the dictionary returned by the MBurger APIs.
- Parameters:
dictionary
: Thedictionary
returned by the APIs.
Implementation
factory MBColorElement({required Map<String, dynamic> dictionary}) {
String? colorString;
if (dictionary['value'] is String) {
colorString = dictionary['value'] as String;
}
return MBColorElement._(
dictionary: dictionary,
colorString: colorString,
);
}