fromMap static method

HistoryItem fromMap(
  1. Map map
)

Implementation

static HistoryItem fromMap(Map map) {
  List? listFromMap = map['imagePath'] as List?;
  List<String>? imagePaths =
      listFromMap == null ? [] : listFromMap.map((item) => "$item").toList();
  return HistoryItem(
    text: map['text'] as String?,
    imagePath: imagePaths,
  );
}