Box class
A graph database box that provides storage and retrieval of nodes and edges.
The Box class is the main interface for interacting with the graph database. It provides methods to save and load nodes and edges, enabling you to build and query graph structures in your Flutter application.
Example:
final box = await Box.init('my_graph_db');
await box.saveNodes(myNode);
final node = box.loadNode('node_id', serializer: MyNode.fromJson);
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
loadEdges<
T> (String fromNodeId, {required T serializer(Map< String, dynamic> )}) → List<T> - Loads all edges originating from a specific node.
-
loadNode<
T> (String nodeId, {required T serializer(Map< String, dynamic> )}) → T? - Loads a node from the graph database by its ID.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
saveEdges(
Edge edge) → Future< void> - Saves an edge to the graph database.
-
saveNodes(
Node node) → Future< void> - Saves a node to the graph database.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited