fromJson static method

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

Implementation

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

  return RichMessage(
    blocks: List<PageBlock>.from(
        ((json['blocks'] as List<dynamic>?) ?? <dynamic>[])
            .map((item) => PageBlock.fromJson(item as Map<String, dynamic>?))
            .toList()),
    isRtl: (json['is_rtl'] as bool?) ?? false,
    isFull: (json['is_full'] as bool?) ?? false,
  );
}