chore: Follow up bubble color
This commit is contained in:
parent
59648bf2d7
commit
321cc07fb8
2 changed files with 21 additions and 7 deletions
|
|
@ -32,6 +32,23 @@ class ChatEventList extends StatelessWidget {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
final theme = Theme.of(context);
|
||||||
|
|
||||||
|
const saturation = 0.85;
|
||||||
|
final colors = theme.brightness == Brightness.light
|
||||||
|
? [
|
||||||
|
HSLColor.fromColor(theme.colorScheme.tertiary)
|
||||||
|
.withSaturation(saturation)
|
||||||
|
.toColor(),
|
||||||
|
theme.colorScheme.primary,
|
||||||
|
]
|
||||||
|
: [
|
||||||
|
HSLColor.fromColor(theme.colorScheme.tertiaryContainer)
|
||||||
|
.withSaturation(saturation)
|
||||||
|
.toColor(),
|
||||||
|
theme.colorScheme.primaryContainer,
|
||||||
|
];
|
||||||
|
|
||||||
final horizontalPadding = FluffyThemes.isColumnMode(context) ? 8.0 : 0.0;
|
final horizontalPadding = FluffyThemes.isColumnMode(context) ? 8.0 : 0.0;
|
||||||
|
|
||||||
final events = timeline.events.filterByVisibleInGui();
|
final events = timeline.events.filterByVisibleInGui();
|
||||||
|
|
@ -153,6 +170,7 @@ class ChatEventList extends StatelessWidget {
|
||||||
previousEvent: i > 0 ? events[i - 1] : null,
|
previousEvent: i > 0 ? events[i - 1] : null,
|
||||||
wallpaperMode: hasWallpaper,
|
wallpaperMode: hasWallpaper,
|
||||||
scrollController: controller.scrollController,
|
scrollController: controller.scrollController,
|
||||||
|
colors: colors,
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -39,6 +39,7 @@ class Message extends StatelessWidget {
|
||||||
final void Function()? resetAnimateIn;
|
final void Function()? resetAnimateIn;
|
||||||
final bool wallpaperMode;
|
final bool wallpaperMode;
|
||||||
final ScrollController scrollController;
|
final ScrollController scrollController;
|
||||||
|
final List<Color> colors;
|
||||||
|
|
||||||
const Message(
|
const Message(
|
||||||
this.event, {
|
this.event, {
|
||||||
|
|
@ -58,6 +59,7 @@ class Message extends StatelessWidget {
|
||||||
this.resetAnimateIn,
|
this.resetAnimateIn,
|
||||||
this.wallpaperMode = false,
|
this.wallpaperMode = false,
|
||||||
required this.scrollController,
|
required this.scrollController,
|
||||||
|
required this.colors,
|
||||||
super.key,
|
super.key,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -328,13 +330,7 @@ class Message extends StatelessWidget {
|
||||||
),
|
),
|
||||||
clipBehavior: Clip.antiAlias,
|
clipBehavior: Clip.antiAlias,
|
||||||
child: BubbleBackground(
|
child: BubbleBackground(
|
||||||
colors: [
|
colors: colors,
|
||||||
theme.brightness == Brightness.light
|
|
||||||
? theme.colorScheme.tertiary
|
|
||||||
: theme.colorScheme
|
|
||||||
.tertiaryContainer,
|
|
||||||
color,
|
|
||||||
],
|
|
||||||
ignore: noBubble || !ownMessage,
|
ignore: noBubble || !ownMessage,
|
||||||
scrollController: scrollController,
|
scrollController: scrollController,
|
||||||
child: Container(
|
child: Container(
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue