observe method
Implementation
SceneState observe(SemanticScene scene) {
// Error wins over loading — a crashed build outranks a spinner.
var loading = false;
for (final label in _labels(scene)) {
if (_errorLabels.contains(label)) return SceneState.error;
if (kLoadingAffordanceLabels.contains(label)) loading = true;
}
return loading ? SceneState.loading : SceneState.loaded;
}