Database class

A representation of the Databse Notion object.

Inheritance

Constructors

Database({List<Text> title = const <Text>[], @deprecated String createdTime = '', @deprecated String lastEditedTime = '', @deprecated String id = ''})
Main database constructor.
Database.fromJson(Map<String, dynamic> json)
Map a new database instance from a json map.
factory
Database.newDatabase({required Parent parent, List<Text> title = const <Text>[], String pagesColumnName = 'Name', Properties? properties})
Database constructor with properties for new Database.
Database.withDefaults({Parent parent = const Parent.none(), List<Text> title = const <Text>[], String createdTime = '', String lastEditedTime = '', String id = ''})
Database constructor with defaults parameters.

Properties

createdTime String
The creation time of the object.
getter/setter pairinherited
hashCode int
The hash code for this object.
no setterinherited
id String
The object id.
getter/setter pairinherited
lastEditedTime String
The last edited time of the object.
getter/setter pairinherited
object ObjectTypes
The type of this object. Always Database for this.
finalgetter/setter pairinherited-setteroverride-getter
parent Parent
The information of the page parent.
getter/setter pair
properties Properties
The properties of this database.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
strObject String
The string value of the object type.
no setterinherited
title List<Text>
The title of this database.
getter/setter pair

Methods

addPropertiesFromJson(Map<String, dynamic> json) Database
Add a group of properties from a json map and return this instance.
addProperty({required String name, required Property property}) Database
Add a new database property with an specific name.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
setBaseProperties({required String createdTime, required String lastEditedTime}) → void
Set the createdTime and the lastEditedTime properties.
inherited
toJson() Map<String, dynamic>
Convert this to a valid json representation for the Notion API.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited