ScienceModel class
The view model for the science analysis page.
- Mixed-in types
Constructors
- ScienceModel()
- Listens to all the ScienceTestBuilders in the UI.
Properties
-
allSamples
↔ Map<
ScienceSensor, List< ScienceAnalysis> > -
A list of all the samples for all the sensors.
getter/setter pair
-
analysesForSample
→ List<
ScienceAnalysis> -
All the sensors for the current sample.
no setter
- errorText ↔ String?
-
The error, if any, that occurred while loading the data.
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasListeners → bool
-
Whether any listeners are currently registered.
no setterinherited
- isListening ↔ bool
-
Whether to listen for new data from the rover. This is false after loading a file.
getter/setter pair
- isLoading ↔ bool
-
Whether the page is currently loading.
getter/setter pair
- metrics → ScienceMetrics
-
The Metrics model for science data.
no setter
- numSamples → int
-
How many samples to analyze. Can be changed in the settings.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- sample ↔ int
-
The sample whose stats are being displayed.
getter/setter pair
Methods
-
addListener(
VoidCallback listener) → void -
Register a closure to be called when the object changes.
inherited
-
addMessage(
WrappedMessage wrapper) → void - Adds a WrappedMessage containing a ScienceData to the UI.
-
addReading(
ScienceSensor sensor, int sample, Timestamp timestamp, double value) → void - Adds a value to the correct analysis for the sensor and sample.
-
clear(
) → void - Clears all the readings from all the samples.
-
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).
override
-
loadFile(
) → Future< void> - Calls addMessage for each message in the picked file.
-
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
-
updateData(
) → void - Updates the graph using addMessage with the latest data from metrics.
-
updateSample(
int? input) → void - Updates the sample variable.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited