Files
Ben HagenandGitHub abe519dae7 Add macOS support (#23)
* Add macOS support

* Update README

* Update to v0.2.0

* Document breaking changes

* Delete widget tests
2025-05-13 16:24:58 +02:00

46 lines
1.0 KiB
Dart

import 'dart:io';
enum AppState {
idle,
permissions,
checkServices,
selectClientType,
readyToDiscover,
discoveringPeers,
streamingPeers,
loadingConnection,
connected,
communicationChannelCreated;
static final List<AppState> androidSteps = [
AppState.idle,
AppState.permissions,
AppState.checkServices,
AppState.readyToDiscover,
AppState.discoveringPeers,
AppState.streamingPeers,
AppState.loadingConnection,
AppState.connected,
AppState.communicationChannelCreated,
];
static final List<AppState> darwinSteps = [
AppState.idle,
AppState.selectClientType,
AppState.readyToDiscover,
AppState.discoveringPeers,
AppState.streamingPeers,
AppState.loadingConnection,
AppState.connected,
AppState.communicationChannelCreated,
];
static final List<AppState> steps = [
if (Platform.isAndroid) ...androidSteps,
if (Platform.isIOS || Platform.isMacOS) ...darwinSteps,
];
int get step {
return steps.indexOf(this);
}
}