MBColorElement constructor

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

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

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

Implementation

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