Database.withDefaults constructor

Database.withDefaults({
  1. Parent parent = const Parent.none(),
  2. List<Text> title = const <Text>[],
  3. String createdTime = '',
  4. String lastEditedTime = '',
  5. String id = '',
})

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,
  );
}