Block constructor

Block({
  1. String? id,
  2. Struct? fields,
  3. Block_Restrictions? restrictions,
  4. Iterable<String>? childrenIds,
  5. String? backgroundColor,
  6. Block_Align? align,
  7. Block_VerticalAlign? verticalAlign,
  8. Block_Content_Smartblock? smartblock,
  9. Block_Content_Text? text,
  10. Block_Content_File? file,
  11. Block_Content_Layout? layout,
  12. Block_Content_Div? div,
  13. Block_Content_Bookmark? bookmark,
  14. Block_Content_Icon? icon,
  15. Block_Content_Link? link,
  16. Block_Content_Dataview? dataview,
  17. Block_Content_Relation? relation,
  18. Block_Content_FeaturedRelations? featuredRelations,
  19. Block_Content_Latex? latex,
  20. Block_Content_TableOfContents? tableOfContents,
  21. Block_Content_Table? table,
  22. Block_Content_TableColumn? tableColumn,
  23. Block_Content_TableRow? tableRow,
  24. Block_Content_Widget? widget,
  25. Block_Content_Chat? chat,
})

Implementation

factory Block({
  $core.String? id,
  $0.Struct? fields,
  Block_Restrictions? restrictions,
  $core.Iterable<$core.String>? childrenIds,
  $core.String? backgroundColor,
  Block_Align? align,
  Block_VerticalAlign? verticalAlign,
  Block_Content_Smartblock? smartblock,
  Block_Content_Text? text,
  Block_Content_File? file,
  Block_Content_Layout? layout,
  Block_Content_Div? div,
  Block_Content_Bookmark? bookmark,
  Block_Content_Icon? icon,
  Block_Content_Link? link,
  Block_Content_Dataview? dataview,
  Block_Content_Relation? relation,
  Block_Content_FeaturedRelations? featuredRelations,
  Block_Content_Latex? latex,
  Block_Content_TableOfContents? tableOfContents,
  Block_Content_Table? table,
  Block_Content_TableColumn? tableColumn,
  Block_Content_TableRow? tableRow,
  Block_Content_Widget? widget,
  Block_Content_Chat? chat,
}) {
  final result = create();
  if (id != null) result.id = id;
  if (fields != null) result.fields = fields;
  if (restrictions != null) result.restrictions = restrictions;
  if (childrenIds != null) result.childrenIds.addAll(childrenIds);
  if (backgroundColor != null) result.backgroundColor = backgroundColor;
  if (align != null) result.align = align;
  if (verticalAlign != null) result.verticalAlign = verticalAlign;
  if (smartblock != null) result.smartblock = smartblock;
  if (text != null) result.text = text;
  if (file != null) result.file = file;
  if (layout != null) result.layout = layout;
  if (div != null) result.div = div;
  if (bookmark != null) result.bookmark = bookmark;
  if (icon != null) result.icon = icon;
  if (link != null) result.link = link;
  if (dataview != null) result.dataview = dataview;
  if (relation != null) result.relation = relation;
  if (featuredRelations != null) result.featuredRelations = featuredRelations;
  if (latex != null) result.latex = latex;
  if (tableOfContents != null) result.tableOfContents = tableOfContents;
  if (table != null) result.table = table;
  if (tableColumn != null) result.tableColumn = tableColumn;
  if (tableRow != null) result.tableRow = tableRow;
  if (widget != null) result.widget = widget;
  if (chat != null) result.chat = chat;
  return result;
}