SCSTW Library
This package provides functionality for managing race states, lane states, and UI interactions in a training or competition environment. It is designed to handle complex race scenarios, including lane-specific actions, race state changes, and UI updates.
Features
- Race State Management: Handle race states such as
FINISHED,RUNNING,DISABLED, and more. - Lane State Management: Manage lane-specific actions like enabling/disabling lanes, handling falls, and computing available actions.
- UI Updates: Dynamically update UI elements such as lane text, colors, and subtext based on race and lane states.
- Command Execution: Send commands to control race and lane states, including enabling/disabling lanes and handling race finishes.
- Autostart Progress Handling: Manage autostart progress based on race settings.
Getting Started
Prerequisites
- Dart SDK
- Flutter framework (if used in a Flutter project)
Installation
Run the following command to add the scstw_lib package to your project:
flutter pub add scstw_lib
Usage
_uiStateController = UIStateController(_connection);
_uiStateSubscription = _uiStateController.uiStateStream.listen((event) {
setState(() {
_uiState = event;
});
});
Libraries
- bluetooth_connection
- connection
- lane_timer
- progress
- proto_out/Command.pb
- proto_out/Command.pbenum
- proto_out/Command.pbjson
- proto_out/Command.pbserver
- proto_out/deprecated/RaceSettings.pb
- proto_out/deprecated/RaceSettings.pbenum
- proto_out/deprecated/RaceSettings.pbjson
- proto_out/deprecated/RaceSettings.pbserver
- proto_out/RaceState.pb
- proto_out/RaceState.pbenum
- proto_out/RaceState.pbjson
- proto_out/RaceState.pbserver
- proto_out/Settings.pb
- proto_out/Settings.pbenum
- proto_out/Settings.pbjson
- proto_out/Settings.pbserver
- proto_out/SocketMessage.pb
- proto_out/SocketMessage.pbenum
- proto_out/SocketMessage.pbjson
- proto_out/SocketMessage.pbserver
- ui_state
- util