Add websocket support (#13)
Reviewed-on: #13
This commit was merged in pull request #13.
This commit is contained in:
1 parent
ce0579b672
commit
26d200e282
16 files changed
+1042
-168
No files matched your search
@@ -36,9 +36,6 @@ class HomeScreen extends ConsumerWidget {
|
||||
final snapshot = ref.watch(busylightSnapshotProvider);
|
||||
final statusAsync = ref.watch(busylightStatusProvider);
|
||||
|
||||
// Start background polling (no-op if already running)
|
||||
ref.watch(pollingProvider);
|
||||
|
||||
if (!snapshot.hasValue && !snapshot.hasError) {
|
||||
return Scaffold(
|
||||
backgroundColor: Colors.black,
|
||||
@@ -65,7 +62,7 @@ class HomeScreen extends ConsumerWidget {
|
||||
loading: () => const Center(child: CircularProgressIndicator(color: Colors.amber)),
|
||||
error: (e, _) => _ErrorView(
|
||||
message: e.toString(),
|
||||
onRetry: () => ref.read(busylightStatusProvider.notifier).refresh(),
|
||||
onRetry: () => ref.invalidate(busylightSnapshotProvider),
|
||||
),
|
||||
data: (_) => const _Body(),
|
||||
),
|
||||
|
||||
Reference in new issue
Block a user