blob: ac0e188ade9336c2d40185e1d3ca254f446744b8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
import 'package:flutter/material.dart';
class ServiceStatusProvider extends ChangeNotifier {
bool _isServiceOnline = false;
String _wakeWord = '';
bool get isServiceOnline => _isServiceOnline;
String get wakeWord => _wakeWord;
void setServiceStatus(bool isOnline) {
_isServiceOnline = isOnline;
notifyListeners(); // Notify listeners (i.e., widgets that depend on this value) about the change
}
void setWakeWord(String wakeWord) {
_wakeWord = wakeWord;
notifyListeners(); // Notify listeners (i.e., widgets that depend on this value) about the change
}
}
|