NmGalaxyController class

State management for Galaxy visualization State of a galaxy view: the liens, the current dimension and its computed points (with the transition between dimensions), zoom and pan. The viewport keeps colors in sync with the theme.

Inheritance

Constructors

NmGalaxyController({NmColors? colors})
Creates an NmGalaxyController (colours default to NativeMind Blue, light).

Properties

colors ↔ NmColors
Theme colours the layouts draw with.
getter/setter pair
dimension → NmGalaxyDimension
Dimension.
no setter
hashCode → int
The hash code for this object.
no setterinherited
hasListeners → bool
Whether any listeners are currently registered.
no setterinherited
isLoading → bool
Is loading.
no setter
isTransitioning → bool
Is transitioning.
no setter
panOffset → Offset
Pan offset.
no setter
positions → List<NmGalaxyPoint>
Positions.
no setter
previousPositions → List<NmGalaxyPoint>
Previous positions.
no setter
properties → List<NmGalaxyLien>
Properties.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
transitionProgress → double
Transition progress.
no setter
zoomLevel → double
Zoom level.
no setter

Methods

addListener(VoidCallback listener) → void
Register a closure to be called when the object changes.
inherited
addProperties(List<NmGalaxyLien> newProperties) → void
Add properties incrementally
clearHighlight() → void
Clear highlighting
dispose() → void
Discards any resources used by the object.
override
filterProperties({String? county, String? stage, double? minRoi, double? maxRoi, double? minRisk, double? maxRisk}) → List<NmGalaxyLien>
Filter properties (returns filtered list without modifying state)
getInterpolatedPositions() → List<NmGalaxyPoint>
Get interpolated positions for animation
getPositionForProperty(String propertyId) → NmGalaxyPoint?
Get position for a specific property
getPropertiesInRegion(Rect region, Size canvasSize) → List<NmGalaxyLien>
Get properties within a region
getPropertyAtPosition(Offset screenPosition, Size canvasSize) → NmGalaxyLien?
Get property at a screen position
highlightProperties(Set<String> propertyIds) → void
Highlight specific properties (update their opacity)
nextDimension({bool animate = true}) → Future<void>
Cycle to next dimension (for rotation gesture)
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notifyListeners() → void
Call all the registered listeners.
inherited
previousDimension({bool animate = true}) → Future<void>
Cycle to previous dimension
removeListener(VoidCallback listener) → void
Remove a previously registered closure from the list of closures that are notified when the object changes.
inherited
resetView() → void
Reset view to default
setDimension(NmGalaxyDimension dimension, {bool animate = true}) → Future<void>
Change the current dimension with optional animation
setLoading(bool loading) → void
Set loading state
setPanOffset(Offset offset) → void
Set pan offset
setProperties(List<NmGalaxyLien> properties) → void
Set properties and recalculate positions
setZoomLevel(double zoom) → void
Set zoom level
toString() → String
A string representation of this object.
inherited
updateProperty(NmGalaxyLien property) → void
Update a single property
updateTransitionProgress(double progress) → void
Update transition progress (called by animation controller)

Operators

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