MBCustomElement constructor

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

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

  • Parameters:
    • dictionary: The dictionary returned by the APIs.

Implementation

factory MBCustomElement({required Map<String, dynamic> dictionary}) {
  dynamic valueFromDictionary = dictionary['value'];

  return MBCustomElement._(
    dictionary: dictionary,
    value: valueFromDictionary,
  );
}