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;
  });
});