duoFoldForLayout function
Watches the fold state at layout granularity: the calling widget
rebuilds when any field a layout decision can read changes (pose,
division/occlusion bands, size classes, hinge status) but not on
raw hinge-angle ticks inside one pose, which a physical sweep emits
continuously (pose carries every angle-derived layout rule). Listeners
that need each event keep ref.listen(duoFoldProvider, …).
Implementation
DuoFoldState duoFoldForLayout(WidgetRef ref) {
ref.watch(duoFoldProvider.select((a) => a.value?.layoutSignature));
return ref.read(duoFoldProvider).value ?? const DuoFoldState.unsupported();
}