fromMap static method

WebHistory? fromMap(
  1. Map<String, dynamic>? map, {
  2. EnumMethod? enumMethod,
})

Gets a possible WebHistory instance from a Map value.

Implementation

static WebHistory? fromMap(
  Map<String, dynamic>? map, {
  EnumMethod? enumMethod,
}) {
  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>(),
                enumMethod: enumMethod,
              )!,
            ),
          )
        : null,
  );
  return instance;
}