From c6295873c8f6bdd2ee0125ff8bec1e0d01e5217b Mon Sep 17 00:00:00 2001 From: Juan Pablo Zapata Date: Thu, 14 Nov 2024 12:54:16 -0300 Subject: [PATCH 1/2] Fixed an issue in Cupertino time picker where default value is not returned on accept if value hasn't changed --- lib/src/platform/platform_time_picker.dart | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/src/platform/platform_time_picker.dart b/lib/src/platform/platform_time_picker.dart index cb6a7c8..a14f7a1 100644 --- a/lib/src/platform/platform_time_picker.dart +++ b/lib/src/platform/platform_time_picker.dart @@ -58,8 +58,10 @@ Future showPlatformTimePicker({ ), ), ); - if (result == true && pickedTime != null) { - return TimeOfDay.fromDateTime(pickedTime!); + if (result == true) { + return pickedTime != null + ? TimeOfDay.fromDateTime(pickedTime!) + : TimeOfDay.fromDateTime(initialDateTime); } return null; } else { From a6b4b7e5eb69f5300dff2c818c2a0a7c87cf3042 Mon Sep 17 00:00:00 2001 From: elpendor Date: Fri, 29 Nov 2024 12:44:59 -0300 Subject: [PATCH 2/2] Fixed wrong background color for time picker --- lib/src/platform/platform_time_picker.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/src/platform/platform_time_picker.dart b/lib/src/platform/platform_time_picker.dart index a14f7a1..0d4da16 100644 --- a/lib/src/platform/platform_time_picker.dart +++ b/lib/src/platform/platform_time_picker.dart @@ -27,7 +27,7 @@ Future showPlatformTimePicker({ width: MediaQuery.of(context).size.width, height: MediaQuery.of(context).size.height * 0.4, child: Container( - color: CupertinoTheme.of(context).barBackgroundColor, + color: Theme.of(context).canvasColor, child: Column( children: [ Row(