fromJson static method

BlockList? fromJson(
  1. Map<String, dynamic>? json
)

Implementation

static BlockList? fromJson(Map<String, dynamic>? json) {
  if (json == null) {
    return null;
  }

  switch (json['@type']) {
    case BlockListMain.constructor:
      return BlockListMain.fromJson(json);

    case BlockListStories.constructor:
      return BlockListStories.fromJson(json);

    default:
      return null;
  }
}