fix: return iOS widgets only on iOS/macOS

This commit is contained in:
Matyáš Caras 2024-02-12 16:32:16 +01:00
parent 0a7dbbde78
commit 75913280be
Signed by untrusted user who does not match committer: hernik
GPG key ID: 2A3175F98820C5C6
2 changed files with 4 additions and 3 deletions

View file

@ -18,6 +18,7 @@
- Make pie chart values more visible by adding the category's corresponding color as background
- Welcome text on Setup view is now centered
- Editing entries is now done by tapping the entry, instead of a dedicated button
- return iOS (Cupertino) widgets only on iOS/macOS
# 1.0.0-alpha+5
- Add tests

View file

@ -11,10 +11,10 @@ abstract class PlatformWidget<A extends Widget, I extends Widget>
@override
Widget build(BuildContext context) {
if (Platform.isAndroid) {
return createAndroidWidget(context);
} else {
if (Platform.isIOS || Platform.isMacOS) {
return createIosWidget(context);
} else {
return createAndroidWidget(context);
}
}