diff --git a/lib/ente_theme_data.dart b/lib/ente_theme_data.dart index 1c3a9ad10..6bdd3017a 100644 --- a/lib/ente_theme_data.dart +++ b/lib/ente_theme_data.dart @@ -1,6 +1,7 @@ import 'dart:ui'; import 'package:flutter/material.dart'; +import 'package:flutter_datetime_picker/flutter_datetime_picker.dart'; extension CustomColorScheme on ColorScheme { Color get defaultTextColor => @@ -55,6 +56,16 @@ extension CustomColorScheme on ColorScheme { Color get cupertinoPickerTopColor => brightness == Brightness.light ? Color.fromARGB(255, 238, 238, 238) : Colors.white.withOpacity(0.1); + + DatePickerTheme get dateTimePickertheme => brightness == Brightness.light + ? DatePickerTheme( + backgroundColor: Colors.white, + itemStyle: TextStyle(color: Colors.black), + cancelStyle: TextStyle(color: Colors.black)) + : DatePickerTheme( + backgroundColor: Colors.black, + itemStyle: TextStyle(color: Colors.white), + cancelStyle: TextStyle(color: Colors.white)); } OutlinedButtonThemeData buildOutlinedButtonThemeData( diff --git a/lib/ui/fading_app_bar.dart b/lib/ui/fading_app_bar.dart index 57ef3d3e7..9e109d702 100644 --- a/lib/ui/fading_app_bar.dart +++ b/lib/ui/fading_app_bar.dart @@ -9,6 +9,7 @@ import 'package:logging/logging.dart'; import 'package:photo_manager/photo_manager.dart'; import 'package:photos/core/event_bus.dart'; import 'package:photos/db/files_db.dart'; +import 'package:photos/ente_theme_data.dart'; import 'package:photos/events/local_photos_updated_event.dart'; import 'package:photos/models/file.dart'; import 'package:photos/models/file_type.dart'; @@ -253,11 +254,7 @@ class FadingAppBarState extends State { maxTime: DateTime.now(), currentTime: DateTime.fromMicrosecondsSinceEpoch(file.creationTime), locale: LocaleType.en, - theme: DatePickerTheme( - backgroundColor: Theme.of(context).backgroundColor, - itemStyle: Theme.of(context).textTheme.subtitle1, - cancelStyle: Theme.of(context).textTheme.subtitle1, - ), + theme: Theme.of(context).colorScheme.dateTimePickertheme, ); if (dateResult == null) { return; @@ -267,11 +264,7 @@ class FadingAppBarState extends State { showTitleActions: true, currentTime: dateResult, locale: LocaleType.en, - theme: DatePickerTheme( - backgroundColor: Theme.of(context).backgroundColor, - itemStyle: Theme.of(context).textTheme.subtitle1, - cancelStyle: Theme.of(context).textTheme.subtitle1, - ), + theme: Theme.of(context).colorScheme.dateTimePickertheme, ); if (dateWithTimeResult != null) { if (await editTime(context, List.of([widget.file]), diff --git a/lib/ui/manage_links_widget.dart b/lib/ui/manage_links_widget.dart index a9f4616f5..4ba25d4d6 100644 --- a/lib/ui/manage_links_widget.dart +++ b/lib/ui/manage_links_widget.dart @@ -309,11 +309,7 @@ class _ManageSharedLinkWidgetState extends State { minTime: DateTime.now(), currentTime: DateTime.now(), locale: LocaleType.en, - theme: DatePickerTheme( - backgroundColor: Theme.of(context).backgroundColor, - itemStyle: Theme.of(context).textTheme.subtitle1, - cancelStyle: Theme.of(context).textTheme.subtitle1, - ), + theme: Theme.of(context).colorScheme.dateTimePickertheme, ); if (dateResult == null) { return null; @@ -323,11 +319,7 @@ class _ManageSharedLinkWidgetState extends State { showTitleActions: true, currentTime: dateResult, locale: LocaleType.en, - theme: DatePickerTheme( - backgroundColor: Theme.of(context).backgroundColor, - itemStyle: Theme.of(context).textTheme.subtitle1, - cancelStyle: Theme.of(context).textTheme.subtitle1, - ), + theme: Theme.of(context).colorScheme.dateTimePickertheme, ); if (dateWithTimeResult == null) { return null; diff --git a/lib/ui/settings/support_section_widget.dart b/lib/ui/settings/support_section_widget.dart index 45244f341..e8f14a793 100644 --- a/lib/ui/settings/support_section_widget.dart +++ b/lib/ui/settings/support_section_widget.dart @@ -72,7 +72,7 @@ class SupportSectionWidget extends StatelessWidget { onDoubleTap: () async { final zipFilePath = await getZippedLogsFile(context); await shareLogs(context, "bug@ente.io", zipFilePath); - }, + }, child: SettingsTextItem( text: "Report bug 🐞", icon: Icons.navigate_next), ),