|
|
|
@ -47,6 +47,10 @@ class OverlayMessage extends StatelessWidget {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
var color = Theme.of(context).colorScheme.surfaceVariant;
|
|
|
|
var color = Theme.of(context).colorScheme.surfaceVariant;
|
|
|
|
|
|
|
|
// #Pangea
|
|
|
|
|
|
|
|
final isLight = Theme.of(context).brightness == Brightness.light;
|
|
|
|
|
|
|
|
var lightness = isLight ? .05 : .85;
|
|
|
|
|
|
|
|
// Pangea#
|
|
|
|
final textColor = ownMessage
|
|
|
|
final textColor = ownMessage
|
|
|
|
? Theme.of(context).colorScheme.onPrimary
|
|
|
|
? Theme.of(context).colorScheme.onPrimary
|
|
|
|
: Theme.of(context).colorScheme.onBackground;
|
|
|
|
: Theme.of(context).colorScheme.onBackground;
|
|
|
|
@ -98,7 +102,21 @@ class OverlayMessage extends StatelessWidget {
|
|
|
|
|
|
|
|
|
|
|
|
if (ownMessage) {
|
|
|
|
if (ownMessage) {
|
|
|
|
color = Theme.of(context).colorScheme.primary;
|
|
|
|
color = Theme.of(context).colorScheme.primary;
|
|
|
|
|
|
|
|
lightness = isLight ? .15 : .85;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// Make overlay a little darker/lighter than the message
|
|
|
|
|
|
|
|
color = Color.fromARGB(
|
|
|
|
|
|
|
|
color.alpha,
|
|
|
|
|
|
|
|
isLight
|
|
|
|
|
|
|
|
? (color.red + lightness * (255 - color.red)).round()
|
|
|
|
|
|
|
|
: (color.red * lightness).round(),
|
|
|
|
|
|
|
|
isLight
|
|
|
|
|
|
|
|
? (color.green + lightness * (255 - color.green)).round()
|
|
|
|
|
|
|
|
: (color.green * lightness).round(),
|
|
|
|
|
|
|
|
isLight
|
|
|
|
|
|
|
|
? (color.blue + lightness * (255 - color.blue)).round()
|
|
|
|
|
|
|
|
: (color.blue * lightness).round(),
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
// #Pangea
|
|
|
|
// #Pangea
|
|
|
|
final pangeaMessageEvent = PangeaMessageEvent(
|
|
|
|
final pangeaMessageEvent = PangeaMessageEvent(
|
|
|
|
|