feat: marcar legenda com markdown, barra de ações nos posts do canal e limites de mensagem na modal
This commit is contained in:
@@ -78,29 +78,32 @@ class MessageContent extends StatelessWidget {
|
||||
: BoxFit.cover;
|
||||
if (w != null && h != null) {
|
||||
fit = BoxFit.contain;
|
||||
if (fullWidthCard &&
|
||||
event.messageType == MessageTypes.Image &&
|
||||
w > 0 &&
|
||||
h > 0) {
|
||||
return AspectRatio(
|
||||
aspectRatio: w / h,
|
||||
child: ImageBubble(
|
||||
event,
|
||||
width: double.infinity,
|
||||
height: double.infinity,
|
||||
fit: BoxFit.cover,
|
||||
borderRadius: borderRadius,
|
||||
timeline: timeline,
|
||||
textColor: textColor,
|
||||
onTap: () => showDialog(
|
||||
context: context,
|
||||
builder: (_) => ImageViewer(
|
||||
event,
|
||||
timeline: timeline,
|
||||
outerContext: context,
|
||||
if (fullWidthCard && event.messageType == MessageTypes.Image) {
|
||||
return LayoutBuilder(
|
||||
builder: (context, constraints) {
|
||||
final maxWidth = constraints.maxWidth;
|
||||
final cardWidth = maxWidth.isFinite && maxWidth > 0
|
||||
? maxWidth
|
||||
: maxSize;
|
||||
final hasKnownRatio = w > 0 && h > 0;
|
||||
return ImageBubble(
|
||||
event,
|
||||
width: cardWidth,
|
||||
height: hasKnownRatio ? cardWidth * h / w : maxSize,
|
||||
fit: hasKnownRatio ? BoxFit.cover : BoxFit.contain,
|
||||
borderRadius: borderRadius,
|
||||
timeline: timeline,
|
||||
textColor: textColor,
|
||||
onTap: () => showDialog(
|
||||
context: context,
|
||||
builder: (_) => ImageViewer(
|
||||
event,
|
||||
timeline: timeline,
|
||||
outerContext: context,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
);
|
||||
}
|
||||
if (w > h) {
|
||||
|
||||
Reference in New Issue
Block a user