MBCheckboxElement constructor
Initializes a checkbox element with the dictionary returned by the MBurger APIs.
- Parameters:
dictionary
: Thedictionary
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,
);
}