MBMarkdownElement constructor Null safety

MBMarkdownElement(
  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 MBMarkdownElement({required Map<String, dynamic> dictionary}) {
  String value = '';
  if (dictionary['value'] is String) {
    value = dictionary['value'] as String;
  }
  return MBMarkdownElement._(
    dictionary: dictionary,
    value: value,
  );
}