Database.withDefaults constructor
Database.withDefaults({})
Database constructor with defaults parameters.
Can receive the parent
(none parent), title
(empty), the createdTime
(""), the lastEditedTime
("") and the database id
("") but every parameter is optional.
Implementation
Database.withDefaults({
this.parent: const Parent.none(),
this.title: const <Text>[],
String createdTime: '',
String lastEditedTime: '',
String id: '',
}) {
this.id = id;
this.setBaseProperties(
createdTime: createdTime,
lastEditedTime: lastEditedTime,
);
}