fromJson static method

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

Implementation

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

  return RichMessageSourceBlocks(
    blocks: List<InputPageBlock>.from(
      tdListFromJson(json['blocks'])
          .map((item) => InputPageBlock.fromJson(tdMapFromJson(item)))
          .whereType<InputPageBlock>(),
    ),
  );
}