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
The `flutter/foundation` package provides a `defaultTargetPlatform` getter, which can be used to check what platform the current app is running on.
105
+
106
+
You can check if the current platform supports accent colors using this extension method:
107
+
108
+
```dart
109
+
import 'package:flutter/foundation.dart' show defaultTargetPlatform;
110
+
111
+
void main() {
112
+
final supported = defaultTargetPlatform.supportsAccentColor;
113
+
114
+
print('Accent color is: ${supported ? 'supported' : 'not supported'} on the current platform');
115
+
}
116
+
```
117
+
102
118
## Contribution
103
119
104
120
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).
0 commit comments