AvailableContentStates.fromJson constructor

AvailableContentStates.fromJson(
  1. Map<String, Object?> json
)

Implementation

factory AvailableContentStates.fromJson(Map<String, Object?> json) {
  return AvailableContentStates(
    spaceContentStates: (json[r'spaceContentStates'] as List<Object?>?)
            ?.map((i) =>
                ContentState.fromJson(i as Map<String, Object?>? ?? const {}))
            .toList() ??
        [],
    customContentStates: (json[r'customContentStates'] as List<Object?>?)
            ?.map((i) =>
                ContentState.fromJson(i as Map<String, Object?>? ?? const {}))
            .toList() ??
        [],
  );
}