Database.newDatabase constructor

Database.newDatabase({
  1. required Parent parent,
  2. List<Text> title = const <Text>[],
  3. String pagesColumnName = 'Name',
  4. Properties? properties,
})

Database constructor with properties for new Database.

Important: This is a temporary solution. In a future this constructor will be remove and the main constructor will be update to work like this one.

Can receive the parent (required), the title (empty) and the pagesColumnName ("Name").

The pagesColumnName is the value of the page column header.

Implementation

Database.newDatabase({
  required this.parent,
  this.title: const <Text>[],
  String pagesColumnName: 'Name',
  Properties? properties,
}) : this.properties = Properties(map: {
        pagesColumnName: TitleProp(),
        if (properties != null) ...properties.entries,
      }) {
  this.id = id;
  this.setBaseProperties(
    createdTime: createdTime,
    lastEditedTime: lastEditedTime,
  );
}