addProperty method

Database addProperty({
  1. required String name,
  2. required Property property,
})

Add a new database property with an specific name.

Example:

// For the title of a database
this.add(
  name: 'title',
  property: TitleProp(content: [
    Text('Title'),
  ]),
);

Implementation

Database addProperty({required String name, required Property property}) {
  this.properties.add(name: name, property: property);
  return this;
}