MBDropdownElementOption.fromDictionary constructor

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

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

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

Implementation

factory MBDropdownElementOption.fromDictionary(
    {required Map<String, dynamic> dictionary}) {
  String key = dictionary['key'] as String;
  String value = dictionary['value'] as String;
  return MBDropdownElementOption._(
    key: key,
    value: value,
  );
}