MBRelation constructor

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

Initializes a relation with the dictionary returned by the MBurger APIs.

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

Implementation

MBRelation({required Map<String, dynamic> dictionary})
    : blockId = dictionary['block_id'] != null
          ? dictionary['block_id'] as int
          : null,
      sectionId = dictionary['section_id'] != null
          ? dictionary['section_id'] as int
          : null;