MBTextElement constructor

MBTextElement({
  1. required Map<String, dynamic> dictionary,
})

Initializes a text element with the dictionary returned by the MBurger APIs.

  • Parameters:
    • dictionary: The dictionary 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,
  );
}