chore: Make message bubble color dark also in dark mode
This commit is contained in:
parent
24b4e8157c
commit
7b1d46aa18
2 changed files with 16 additions and 5 deletions
|
|
@ -106,8 +106,11 @@ class Message extends StatelessWidget {
|
||||||
previousEvent!.senderId == event.senderId &&
|
previousEvent!.senderId == event.senderId &&
|
||||||
previousEvent!.originServerTs.sameEnvironment(event.originServerTs);
|
previousEvent!.originServerTs.sameEnvironment(event.originServerTs);
|
||||||
|
|
||||||
final textColor =
|
final textColor = ownMessage
|
||||||
ownMessage ? theme.colorScheme.onPrimary : theme.colorScheme.onSurface;
|
? theme.brightness == Brightness.light
|
||||||
|
? theme.colorScheme.onPrimary
|
||||||
|
: theme.colorScheme.onPrimaryContainer
|
||||||
|
: theme.colorScheme.onSurface;
|
||||||
final rowMainAxisAlignment =
|
final rowMainAxisAlignment =
|
||||||
ownMessage ? MainAxisAlignment.end : MainAxisAlignment.start;
|
ownMessage ? MainAxisAlignment.end : MainAxisAlignment.start;
|
||||||
|
|
||||||
|
|
@ -141,7 +144,9 @@ class Message extends StatelessWidget {
|
||||||
if (ownMessage) {
|
if (ownMessage) {
|
||||||
color = displayEvent.status.isError
|
color = displayEvent.status.isError
|
||||||
? Colors.redAccent
|
? Colors.redAccent
|
||||||
: theme.colorScheme.primary;
|
: theme.brightness == Brightness.light
|
||||||
|
? theme.colorScheme.primary
|
||||||
|
: theme.colorScheme.primaryContainer;
|
||||||
}
|
}
|
||||||
|
|
||||||
final resetAnimateIn = this.resetAnimateIn;
|
final resetAnimateIn = this.resetAnimateIn;
|
||||||
|
|
|
||||||
|
|
@ -214,7 +214,9 @@ class SettingsStyleView extends StatelessWidget {
|
||||||
),
|
),
|
||||||
child: DecoratedBox(
|
child: DecoratedBox(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: theme.colorScheme.primary,
|
color: theme.brightness == Brightness.light
|
||||||
|
? theme.colorScheme.primary
|
||||||
|
: theme.colorScheme.primaryContainer,
|
||||||
borderRadius: BorderRadius.circular(
|
borderRadius: BorderRadius.circular(
|
||||||
AppConfig.borderRadius,
|
AppConfig.borderRadius,
|
||||||
),
|
),
|
||||||
|
|
@ -227,7 +229,11 @@ class SettingsStyleView extends StatelessWidget {
|
||||||
child: Text(
|
child: Text(
|
||||||
'Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor',
|
'Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: theme.colorScheme.onPrimary,
|
color:
|
||||||
|
theme.brightness == Brightness.light
|
||||||
|
? theme.colorScheme.onPrimary
|
||||||
|
: theme.colorScheme
|
||||||
|
.onPrimaryContainer,
|
||||||
fontSize: AppConfig.messageFontSize *
|
fontSize: AppConfig.messageFontSize *
|
||||||
AppConfig.fontSizeFactor,
|
AppConfig.fontSizeFactor,
|
||||||
),
|
),
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue