fromJson static method

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

Implementation

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

  return LinkPreviewTypeBackground(
    document: Document.fromJson(tdMapFromJson(json['document'])),
    backgroundType: BackgroundType.fromJson(
      tdMapFromJson(json['background_type']),
    ),
  );
}