Children.fromJson constructor
Children.fromJson(
- List json
Map a new children instance from a json
blocks list.
The blocks with the block type None are excluded because that type represent blocks than can't be mapped as a knowing Notion block type.
Implementation
factory Children.fromJson(List<dynamic> json) {
List<Block> blocks = Block.fromListJson(json);
blocks.removeWhere((block) => block.type == BlockTypes.None);
return Children.withBlocks(blocks);
}