MAJProvider class

Mixed in types

Constructors

MAJProvider({required MAJNode currentNode, String mapKey = defaultMapKey})

Properties

currentNode MAJNode
the node to be displayed currently
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
hasListeners bool
Whether any listeners are currently registered.
no setterinherited
mapKey String
the default map key used if by MAJBuilder if no key is specified
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

addListener(VoidCallback listener) → void
Register a closure to be called when the object changes.
inherited
dispose() → void
Discards any resources used by the object. After this is called, the object is not in a usable state and should be discarded (calls to addListener will throw after the object is disposed).
inherited
pass a valid path ex /root/node this will make the MAJBuilder change the currently displayed node to the node with the path passed ex: context.read
allows navigation to a node by a reference to a node this will make the MAJBuilder change the currently displayed node to the passed node ex: context.read
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notifyListeners() → void
Call all the registered listeners.
inherited
removeListener(VoidCallback listener) → void
Remove a previously registered closure from the list of closures that are notified when the object changes.
inherited
toString() String
A string representation of this object.
inherited

Operators

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

Static Properties

maps Map<String, Map<String, MAJNode>>
The outer map references a unique key for each tree, if there is only one tree the default map key is used. If there is to be more than one tree in memory at a time, ensure each tree has a key in the outer map. The inner maps contain the path of each node in the tree, and a memory reference to that node, so any node can be accessed O(1)
getter/setter pair

Static Methods

addToMap({required MAJNode node, bool check = false}) → void
adds a key and node reference to the map overwrites existing entries unless check == true if a key already exists and check == true an error is thrown
removeFromMap({required String path, String mapKey = MAJProvider.defaultMapKey}) MAJNode?
removes a value from the map if the key exists otherwise null is returned

Constants

defaultMapKey → const String
the default map key used in MAJProvider.maps