fromJson static method
Implementation
static PageBlockListItem? fromJson(Map<String, dynamic>? json) {
if (json == null) {
return null;
}
return PageBlockListItem(
label: (json['label'] as String?) ?? '',
blocks: List<PageBlock>.from(
tdListFromJson(json['blocks'])
.map((item) => PageBlock.fromJson(tdMapFromJson(item)))
.whereType<PageBlock>(),
),
hasCheckbox: (json['has_checkbox'] as bool?) ?? false,
isChecked: (json['is_checked'] as bool?) ?? false,
value: (json['value'] as int?) ?? 0,
type: (json['type'] as String?) ?? '',
);
}