Add flexible to file messages to prevent long name overflow (#3551)

pull/2245/head
Kelrap 4 months ago committed by GitHub
parent 8c16e50d5c
commit c017508a6a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -53,26 +53,31 @@ class MessageDownloadContent extends StatelessWidget {
backgroundColor: textColor.withAlpha(32), backgroundColor: textColor.withAlpha(32),
child: Icon(Icons.file_download_outlined, color: textColor), child: Icon(Icons.file_download_outlined, color: textColor),
), ),
Column( // #Pangea
crossAxisAlignment: CrossAxisAlignment.start, Flexible(
mainAxisSize: MainAxisSize.min, child:
children: [ // Pangea#
Text( Column(
filename, crossAxisAlignment: CrossAxisAlignment.start,
maxLines: 1, mainAxisSize: MainAxisSize.min,
overflow: TextOverflow.ellipsis, children: [
style: TextStyle( Text(
color: textColor, filename,
fontWeight: FontWeight.w500, maxLines: 1,
overflow: TextOverflow.ellipsis,
style: TextStyle(
color: textColor,
fontWeight: FontWeight.w500,
),
), ),
), Text(
Text( '$sizeString | $filetype',
'$sizeString | $filetype', maxLines: 1,
maxLines: 1, overflow: TextOverflow.ellipsis,
overflow: TextOverflow.ellipsis, style: TextStyle(color: textColor, fontSize: 10),
style: TextStyle(color: textColor, fontSize: 10), ),
), ],
], ),
), ),
], ],
), ),

Loading…
Cancel
Save