ContentState.fromJson constructor

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

Implementation

factory ContentState.fromJson(Map<String, Object?> json) {
  return ContentState(
    id: (json[r'id'] as num?)?.toInt() ?? 0,
    name: json[r'name'] as String? ?? '',
    color: json[r'color'] as String? ?? '',
  );
}