Arokip / flutter_diagram_editor

Fllutter diagram editor library
MIT License
116 stars 38 forks source link

Get result of connected components #29

Closed jordandevogelaere closed 2 years ago

jordandevogelaere commented 2 years ago

Hi,

Is it possible to see (fetch) which components are connected to each other?

I would like to save the connected id's to the database.

Thanks in advance.

Kind regards,

Jordan

Arokip commented 2 years ago

Hello,

it is possible to see.

For instance, you can iterate through IDs of the other components to which the one is connected:

    canvasReader.model.getComponent(oneComponentId).connections.forEach((connection) {
      connection.otherComponentId; // the ID
    });