MBElement constructor Null safety

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

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

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

Implementation

MBElement({required Map<String, dynamic> dictionary})
    : id = dictionary['id'] as int,
      order = dictionary['order'] as int,
      type = MBElementsUtilities.elementTypeFromString(
          dictionary['type'] as String);