From 75913280bee70738f890830df3ba651d54fb5ae6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maty=C3=A1=C5=A1=20Caras?= Date: Mon, 12 Feb 2024 16:32:16 +0100 Subject: [PATCH] fix: return iOS widgets only on iOS/macOS --- CHANGELOG.md | 1 + lib/pw/platformwidget.dart | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 07cf67f..b6f00e7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/lib/pw/platformwidget.dart b/lib/pw/platformwidget.dart index b48c0b0..5d7d290 100644 --- a/lib/pw/platformwidget.dart +++ b/lib/pw/platformwidget.dart @@ -11,10 +11,10 @@ abstract class PlatformWidget @override Widget build(BuildContext context) { - if (Platform.isAndroid) { - return createAndroidWidget(context); - } else { + if (Platform.isIOS || Platform.isMacOS) { return createIosWidget(context); + } else { + return createAndroidWidget(context); } }