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(((json['blocks'] as List<dynamic>?) ??
            <dynamic>[])
        .map((item) => InputPageBlock.fromJson(item as Map<String, dynamic>?))
        .toList()),
    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?) ?? '',
  );
}