Fixed wrong text bubble width with small messages
This commit is contained in:
parent
9411bfa2dd
commit
7bd6042bbf
@ -124,10 +124,7 @@ class _ChatBubbleState extends State<ChatBubble> {
|
|||||||
maxWidth: MediaQuery.of(context).size.width * 0.9,
|
maxWidth: MediaQuery.of(context).size.width * 0.9,
|
||||||
minWidth: showActorDisplayName ? _textSize(widget.bubbleData.actorDisplayName, actorTextStyle).width : 30,
|
minWidth: showActorDisplayName ? _textSize(widget.bubbleData.actorDisplayName, actorTextStyle).width : 30,
|
||||||
),
|
),
|
||||||
child: Column(
|
child: Stack(
|
||||||
mainAxisSize: MainAxisSize.min,
|
|
||||||
children: [
|
|
||||||
Stack(
|
|
||||||
children: [
|
children: [
|
||||||
Padding(
|
Padding(
|
||||||
padding: EdgeInsets.only(bottom: showBubbleTime ? 18 : 0, top: showActorDisplayName ? 18 : 0),
|
padding: EdgeInsets.only(bottom: showBubbleTime ? 18 : 0, top: showActorDisplayName ? 18 : 0),
|
||||||
@ -141,6 +138,7 @@ class _ChatBubbleState extends State<ChatBubble> {
|
|||||||
child: Text(
|
child: Text(
|
||||||
widget.bubbleData.actorDisplayName,
|
widget.bubbleData.actorDisplayName,
|
||||||
textAlign: TextAlign.start,
|
textAlign: TextAlign.start,
|
||||||
|
overflow: TextOverflow.ellipsis,
|
||||||
style: actorTextStyle,
|
style: actorTextStyle,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@ -157,14 +155,17 @@ class _ChatBubbleState extends State<ChatBubble> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
|
||||||
),
|
|
||||||
Visibility(
|
Visibility(
|
||||||
visible: downloadProgress > 0,
|
visible: downloadProgress > 0,
|
||||||
child: LinearProgressIndicator(value: downloadProgress/100)
|
child: Positioned(
|
||||||
|
bottom: 0,
|
||||||
|
right: 0,
|
||||||
|
left: 0,
|
||||||
|
child: LinearProgressIndicator(value: downloadProgress/100),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
)
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
onLongPress: () {
|
onLongPress: () {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user