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