mirror of
https://gitlab.com/famedly/fluffychat.git
synced 2024-11-27 14:59:29 +01:00
feat: Nicer design of images an stickers
This commit is contained in:
parent
86af401cfc
commit
2f89913e36
@ -89,6 +89,11 @@ class Message extends StatelessWidget {
|
|||||||
bottomLeft: const Radius.circular(AppConfig.borderRadius),
|
bottomLeft: const Radius.circular(AppConfig.borderRadius),
|
||||||
bottomRight: const Radius.circular(AppConfig.borderRadius),
|
bottomRight: const Radius.circular(AppConfig.borderRadius),
|
||||||
);
|
);
|
||||||
|
final noBubble = {
|
||||||
|
MessageTypes.Video,
|
||||||
|
MessageTypes.Image,
|
||||||
|
MessageTypes.Sticker,
|
||||||
|
}.contains(event.messageType);
|
||||||
|
|
||||||
if (ownMessage) {
|
if (ownMessage) {
|
||||||
color = displayEvent.status.isError
|
color = displayEvent.status.isError
|
||||||
@ -140,11 +145,12 @@ class Message extends StatelessWidget {
|
|||||||
alignment: alignment,
|
alignment: alignment,
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 8),
|
padding: const EdgeInsets.symmetric(horizontal: 8),
|
||||||
child: Material(
|
child: Material(
|
||||||
color: color,
|
color: noBubble ? null : color,
|
||||||
elevation: 6,
|
elevation: noBubble ? 0 : 6,
|
||||||
shadowColor:
|
shadowColor:
|
||||||
Theme.of(context).secondaryHeaderColor.withAlpha(100),
|
Theme.of(context).secondaryHeaderColor.withAlpha(100),
|
||||||
borderRadius: borderRadius,
|
borderRadius: borderRadius,
|
||||||
|
clipBehavior: Clip.antiAlias,
|
||||||
child: InkWell(
|
child: InkWell(
|
||||||
onHover: (b) => useMouse = true,
|
onHover: (b) => useMouse = true,
|
||||||
onTap: !useMouse && longPressSelect
|
onTap: !useMouse && longPressSelect
|
||||||
@ -157,7 +163,8 @@ class Message extends StatelessWidget {
|
|||||||
borderRadius:
|
borderRadius:
|
||||||
BorderRadius.circular(AppConfig.borderRadius),
|
BorderRadius.circular(AppConfig.borderRadius),
|
||||||
),
|
),
|
||||||
padding: const EdgeInsets.all(16),
|
padding:
|
||||||
|
noBubble ? EdgeInsets.zero : const EdgeInsets.all(16),
|
||||||
constraints: const BoxConstraints(
|
constraints: const BoxConstraints(
|
||||||
maxWidth: FluffyThemes.columnWidth * 1.5),
|
maxWidth: FluffyThemes.columnWidth * 1.5),
|
||||||
child: Stack(
|
child: Stack(
|
||||||
|
Loading…
Reference in New Issue
Block a user