MBCheckboxElement constructor

MBCheckboxElement({
  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.

Implementation

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,
  );
}