diff --git a/lib/providers/settings_provider.dart b/lib/providers/settings_provider.dart index 24caac1e..15c10f37 100644 --- a/lib/providers/settings_provider.dart +++ b/lib/providers/settings_provider.dart @@ -233,7 +233,8 @@ class SettingsProvider extends ChangeNotifier { systemLocale, ); _snoozedUntil = - DateTime.tryParse(data[kHiveSnoozedUntil]) ?? defaultSnoozedUntil; + DateTime.tryParse((data[kHiveSnoozedUntil] as String?) ?? '') ?? + defaultSnoozedUntil; _notificationClickBehavior = NotificationClickBehavior.values[ data[kHiveNotificationClickBehavior] ?? kDefaultNotificationClickBehavior.index]; diff --git a/lib/widgets/device_grid/mobile/mobile_device_grid.dart b/lib/widgets/device_grid/mobile/mobile_device_grid.dart index dafa4d38..cc3eac99 100644 --- a/lib/widgets/device_grid/mobile/mobile_device_grid.dart +++ b/lib/widgets/device_grid/mobile/mobile_device_grid.dart @@ -80,7 +80,12 @@ class _MobileDeviceGridState extends State { child: PageTransitionSwitcher( child: view.devices.keys .map((key) => _MobileDeviceGridChild(tab: key)) - .elementAt(view.tab.clamp(0, view.devices.length - 1)), + .elementAt( + view.devices.keys + .toList() + .indexOf(view.tab) + .clamp(0, view.devices.length - 1), + ), transitionBuilder: (child, primaryAnimation, secondaryAnimation) { return FadeThroughTransition( animation: primaryAnimation, diff --git a/windows/flutter/CMakeLists.txt b/windows/flutter/CMakeLists.txt index 930d2071..903f4899 100644 --- a/windows/flutter/CMakeLists.txt +++ b/windows/flutter/CMakeLists.txt @@ -10,6 +10,11 @@ include(${EPHEMERAL_DIR}/generated_config.cmake) # https://github.com/flutter/flutter/issues/57146. set(WRAPPER_ROOT "${EPHEMERAL_DIR}/cpp_client_wrapper") +# Set fallback configurations for older versions of the flutter tool. +if (NOT DEFINED FLUTTER_TARGET_PLATFORM) + set(FLUTTER_TARGET_PLATFORM "windows-x64") +endif() + # === Flutter Library === set(FLUTTER_LIBRARY "${EPHEMERAL_DIR}/flutter_windows.dll") @@ -92,7 +97,7 @@ add_custom_command( COMMAND ${CMAKE_COMMAND} -E env ${FLUTTER_TOOL_ENVIRONMENT} "${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.bat" - windows-x64 $ + ${FLUTTER_TARGET_PLATFORM} $ VERBATIM ) add_custom_target(flutter_assemble DEPENDS