Download and install
Add the pure-Dart ScreenSteer client and pair it with livekit_client for room data and screen sharing.
Requirements
- ✓Dart 3+
- ✓Flutter
- ✓livekit_client 2.0+
Start with explicit consent
Replace pk_dev_… with the Development key shown once when you create it in the console. Use the one-time pk_live_… key from the Production environment after paid activation.
final client = ScreenSteerClient(const ScreenSteerConfig(
baseUrl: 'https://screensteer.com',
publishableKey: 'pk_dev_…',
));
// Start only after your consent UI is approved.
final session = await client.createSession(externalUserId: user.id);
// Connect LiveKit, enable screen share, then start DeviceAgent.Add the Dart package and LiveKit
Reference the downloaded screensteer_client package from pubspec.yaml and add livekit_client.
The core client is pure Dart. The application owns the platform-specific LiveKit room and screen-share setup.
dependencies:
screensteer_client:
path: ../screensteer_client
livekit_client: ^2.0.0Implement transport and connect
Implement ScreenSteerTransport over a connected livekit_client Room, preserving message topics and reliable or lossy delivery.
After view consent, create the ScreenSteer session, connect LiveKit with the returned credentials, enable screen share, then start DeviceAgent.
Register actions and RenderBox geometry
Register only permitted application handlers. Measure each action’s RenderBox and convert it to normalized coordinates for the captured surface.
Refresh the registry after layout, scroll, rotation, navigation, or enabled-state changes.
Handle control consent and lifecycle
Show an application-owned consent sheet from onControlRequested, post the decision, and update DeviceAgent’s controller state.
Keep Stop visible and tear down the agent, capture, and room when either side ends.
What the device enforces
- ●No raw input injection; registered actions only.
- ●Session, expiry, sender sequence, controller lease, and layout checks.
- ●Device-owned consent, revoke, and Stop.
- ●Reliable command acknowledgements.
Smoke test
- 1Run the bundled Dart tests.
- 2Launch the target Flutter platform with a Development key.
- 3Approve view consent, connect LiveKit, and start screen sharing.
- 4Join from the console and invoke one registered action.
- 5Rotate or resize and verify stale geometry fails closed.
- 6Stop from both sides in separate runs.
Troubleshooting
Transport data is not received
Map LiveKit DataReceivedEvent, ParticipantConnectedEvent, and RoomDisconnectedEvent to the three ScreenSteer transport streams.
Target geometry is wrong
Measure after layout completes and normalize against the exact surface being captured.
Screen sharing differs by target platform
Follow livekit_client’s platform-specific capture permissions and lifecycle guidance for that Flutter target.