MBCheckboxElement constructor Null safety

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

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

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


factory MBCheckboxElement({required Map<String, dynamic> dictionary}) {
  bool value = false;
  if (dictionary['value'] is bool) {
    value = dictionary['value'] as bool;
  return MBCheckboxElement._(
    dictionary: dictionary,
    value: value,