fromMap static method

WebHistory? fromMap(
  1. Map<String, dynamic>? map
)

Gets a possible WebHistory instance from a Map value.

Implementation

static WebHistory? fromMap(Map<String, dynamic>? map) {
  if (map == null) {
    return null;
  }
  final instance = WebHistory(
    currentIndex: map['currentIndex'],
    list: map['list'] != null
        ? List<WebHistoryItem>.from(map['list']
            .map((e) => WebHistoryItem.fromMap(e?.cast<String, dynamic>())!))
        : null,
  );
  return instance;
}