Page constructor

Page({
  1. required Parent parent,
  2. bool archived = false,
  3. Children? children,
  4. String id = '',
  5. Text? title,
})

Main constructor for the page.

This constructor require the parent and can receive if is archived and his children. Also the id of the page and the title.

The children and title fields are defined for when a new page is created.

Implementation

Page({
  required this.parent,
  this.archived: false,
  this.children,
  String id: '',
  Text? title,
}) {
  this.id = id;
  if (title != null) {
    this.title = title;
  }
  if (this.children == null) {
    this.children = Children();
  }
}