fromMap static method

ShakePicker fromMap(
  1. Map data
)
override

Converts map to object.

Implementation

static ShakePicker fromMap(Map data) {
  String key = data['key'] ?? '';
  String? label = data['label'];
  List<dynamic> itemsMaps = data['items'] ?? [];
  String? labelRes = data['labelRes'];

  List<ShakePickerItem> items =
      itemsMaps.map((c) => ShakePickerItem.fromMap(c)).toList();

  return ShakePicker(key, label, items, labelRes: labelRes);
}