Skip to content

Commit

Permalink
fix mail background color
Browse files Browse the repository at this point in the history
  • Loading branch information
hatch01 committed Jan 23, 2024
1 parent 811997f commit 5ce67e5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ class _MailContentWidgetState extends State<MailContentWidget> {
bool isDark = Theme.of(context).brightness == Brightness.dark;
html = widget.mail.getThemedBody(
isDarkMode: isDark,
bgColor: Theme.of(context).colorScheme.background.toHex(),
bgColor: Theme.of(context).cardTheme.color!.toHex(),
textColor: Theme.of(context).textTheme.bodyMedium!.color!.toHex(),
);
}

if (((widget.mail.body.contains("<html") ||
widget.mail.body.contains("text/html")) &&
(!kIsWeb && (Platform.isAndroid || Platform.isIOS)))) {
Expand Down
4 changes: 2 additions & 2 deletions packages/lyon1mailclient/lib/src/model/mail.dart
Original file line number Diff line number Diff line change
Expand Up @@ -201,8 +201,8 @@ class Mail extends Equatable {
DarkReader.enable({
mode: ${(isDarkMode) ? "1" : "0"},
brightness: 100,
contrast: 90,
sepia: 10,
contrast: 100,
sepia: 0,
${(isDarkMode && bgColor != null) ? "darkSchemeBackgroundColor: '$bgColor'," : ""}
${(isDarkMode && textColor != null) ? "darkSchemeTextColor: '$textColor'," : ""}
${(!isDarkMode && bgColor != null) ? "lightSchemeBackgroundColor: '$bgColor'," : ""}
Expand Down

0 comments on commit 5ce67e5

Please sign in to comment.