fromJson static method

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

Implementation

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

  return InputPageBlockListItem(
    blocks: List<InputPageBlock>.from(
      tdListFromJson(json['blocks'])
          .map((item) => InputPageBlock.fromJson(tdMapFromJson(item)))
          .whereType<InputPageBlock>(),
    ),
    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?) ?? '',
  );
}