Skip to content

Creating document result in an error #3

@dimityrivanov

Description

@dimityrivanov

Using this piece of code to add document it result in an error also into the /console I am unable to find button to add document to collection.
What am I doing wrong ?

    Future result = database.createDocument(
      collectionId: '<my id was here>',
      data: [ // Rules
        {
          "label": "Name",
          "key": "name",
          "type": "text",
          "default": "Empty Name",
          "required": true,
          "array": false
        },
        {
          "label": "Release Year",
          "key": "releaseYear",
          "type": "numeric",
          "default": 1970,
          "required": true,
          "array": false
        },
        {
          "label": "Notes",
          "key": "notes",
          "type": "text",
          "default": null,
          "required": false,
          "array": true
        }
      ],
      read: [],
      write: [],
    );

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions