models library
A library that manages and controls the state of the app.
This library is comprised of classes that have methods to allow simple control over the app's state, which can have side effects as well. For example, adjusting the speed of the rover will change the value of the on-screen speedometer while also commanding the rover to move faster.
This library may depend on the data and services library.
Classes
- AddressBuilder
- A specialized TextBuilder to handle IP addresses.
- ArmControls
- A RoverControls that controls the arm.
- ArmSettingsBuilder
- A ValueBuilder representing an ArmSettings.
- AutonomyCommandBuilder
- A ValueBuilder to modify and send an AutonomyCommand.
- AutonomyModel
- A view model for the autonomy page to render a grid map.
- CameraControls
- A RoverControls for the rover's front and rear cameras.
- CameraDetailsBuilder
- A ValueBuilder view model to modify a CameraDetails.
- ColorBuilder
- A view model to modify a color and send it to the rover.
- Controller
- Uses the gamepad to control the rover.
- DashboardSettingsBuilder
- A ValueBuilder that modifies a DashboardSettings.
- DriveControls
- The skid-steer drive controls.
- EasterEggsSettingsBuilder
- A ValueBuilder that modifies an EasterEggsSettings.
- ElectricalModel
- The view model for the electrical analysis page.
- A view model for the footer that updates when needed.
- GpsBuilder
- A ValueBuilder to modify a GpsCoordinates object in either GpsType.
- GridOffset
- Like an Offset from Flutter, but using integers instead of doubles.
- HomeModel
- The view model for the main page.
- LogsModel
- A data model that collects and stores logs from the rover.
- LogsOptionsViewModel
- A view model to track options for the logs page.
- LogsViewModel
- A view model for the logs page to control which logs are shown.
- MessagesModel
- A single model to consolidate all messages.
- MissionTimer
- A timer to keep track of progress in a mission.
- Model
- A data model that handles data from services.
- Models
- A wrapper model around all other data models used by the app.
- ModernDriveControls
- Modern drive controls, similar to most racing video games.
- NetworkSettingsBuilder
- A ValueBuilder representing a NetworkSettings.
- NoControls
- A RoverControls that does nothing.
-
NumberBuilder<
T extends num> - A specialized TextBuilder to handle numeric inputs.
- PositionModel
- The view model for the electrical analysis page.
- PresetBuilder
- A builder for presets.
- Rover
- The model to control the entire rover.
- RoverControls
- A class that controls one subsystem based on the gamepad state.
- RoverMetrics
- A data model that listens for updated data and provides Metrics to the UI.
- ScienceAnalysis
- Analysis for one sample and sensor.
- ScienceCommandBuilder
- A ValueBuilder to modify and send an AutonomyCommand.
- ScienceControls
- A RoverControls that controls the science chamber.
- ScienceModel
- The view model for the science analysis page.
- ScienceSettingsBuilder
- A ValueBuilder that modifies a ScienceSettings.
- ScienceTestBuilder
- A view model to allow the user to override values supplied to ScienceTests.
- SerialModel
- A data model to manage all connected serial devices.
- SettingsBuilder
- A ValueBuilder representing an ArmSettings.
- SettingsModel
- Manages the user's settings.
- SocketBuilder
- A ValueBuilder that modifies a SocketInfo.
- Sockets
- Coordinates all the sockets to point to the right RoverType.
-
TextBuilder<
T> - A ValueBuilder backed by a Flutter TextField.
- ThrottleBuilder
- A view model to allow the user to edit a throttle value and send it to the rover.
- TimerBuilder
- Starts a MissionTimer based on user input.
-
ValueBuilder<
T> - A view model to modify a value.
- VideoModel
- A data model to stream video from the rover.
- ViewsModel
- A data model for keeping track of the on-screen views.
Enums
- AutonomyCell
- Represents the state of a cell on the autonomy map.
- GpsType
- The format to enter a GPS coordinate.
Extensions
-
WrappedMessageStream
on Stream<
WrappedMessage> -
Helpful methods on
Stream
s of WrappedMessages.
Constants
- gamepadDelay → const Duration
- How often to check the gamepad for new button presses.
- maxLogCount → const int
- The maximum amount of logs (to prevent consuming too much memory).
Properties
Exceptions / Errors
- RequestNotAccepted
- An exception thrown when the rover does not respond to a handshake.