Models class

A wrapper model around all other data models used by the app.

Use this class to ensure a data model will be initialized before the dashboard starts. For a view model (a model that only needs to be used in one part of the UI), use the model directly with a ChangeNotifierProvider from package:provider.

When adding a new model to this class, be sure to:

  1. Add it as a field
  2. Initialize it in init
  3. Add it to the MultiProvider in app.dart
Inheritance

Constructors

Models()

Properties

hashCode → int
The hash code for this object.
no setterinherited
hasListeners → bool
Whether any listeners are currently registered.
no setterinherited
home HomeModel
Contains persistent data about the dashboard's current state.
final
isReady ↔ bool
Whether all models have been initialized.
getter/setter pair
logs LogsModel
The logs model.
final
messages MessagesModel
The messages model.
final
rover Rover
Controls and interacts with the rover.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
serial SerialModel
Responsible for connecting to and monitoring Serial devices.
final
settings SettingsModel
Caches the settings and updates them to all listeners.
final
sockets Sockets
The data model responsible for communicating over Protobuf.
final
video VideoModel
The data model to provide video from the rover.
final
views ViewsModel
The views data model.
final

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).
override
init() → Future<void>
Initializes any data needed by this model.
override
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