aboutsummaryrefslogtreecommitdiffstats
path: root/lib/providers
diff options
context:
space:
mode:
Diffstat (limited to 'lib/providers')
-rw-r--r--lib/providers/service_status.dart12
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/providers/service_status.dart b/lib/providers/service_status.dart
new file mode 100644
index 0000000..595c92e
--- /dev/null
+++ b/lib/providers/service_status.dart
@@ -0,0 +1,12 @@
+import 'package:flutter/material.dart';
+
+class ServiceStatusProvider extends ChangeNotifier {
+ bool _isServiceOnline = false;
+
+ bool get isServiceOnline => _isServiceOnline;
+
+ void setServiceStatus(bool isOnline) {
+ _isServiceOnline = isOnline;
+ notifyListeners(); // Notify listeners (i.e., widgets that depend on this value) about the change
+ }
+}