CustomPreview.fromJson constructor

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

Implementation

factory CustomPreview.fromJson(Map<String, dynamic> json) {
  return CustomPreview(
    header: json['header'] as String,
    bodyGetterId: json.containsKey('bodyGetterId')
        ? RemoteObjectId.fromJson(json['bodyGetterId'] as String)
        : null,
  );
}