You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To simply listen to changes on the system accent color, use the `SystemTheme.onChange` stream:
87
+
88
+
```dart
89
+
SystemTheme.onChange.listen((event) {
90
+
debugPrint('Accent color changed to ${event.accentColor}');
91
+
});
92
+
```
93
+
94
+
Alteratively, you can the `SystemThemeBuilder` widget to listen to changes on the system accent color:
95
+
96
+
```dart
97
+
SystemThemeBuilder(builder: (context, accent) {
98
+
return ColoredBox(color: accent.accentColor);
99
+
});
100
+
```
101
+
83
102
## Contribution
84
103
85
104
Feel free to [open an issue](https://github.com/bdlukaa/system_theme/issues/new) if you find an error or [make pull requests](https://github.com/bdlukaa/system_theme/pulls).
86
105
87
106
### Acknowlegments
88
107
89
108
-[@alexmercerind](https://github.com/alexmercerind) for the Windows implementation
109
+
-[@pgiacomo69](https://github.com/pgiacomo69) for the accent color listener
0 commit comments