TF-2537 Fix app crash when user trying attach file to composer in web app

Signed-off-by: dab246 <tdvu@linagora.com>
This commit is contained in:
dab246
2024-02-21 08:31:40 +07:00
committed by Dat H. Pham
parent 20fe348672
commit 7e96d09f52
9 changed files with 96 additions and 52 deletions
@@ -53,18 +53,25 @@ class AttachmentItemWidget extends StatelessWidget {
),
const SizedBox(width: AttachmentItemWidgetStyle.space),
Expanded(
child: ExtendedText(
(attachment.name ?? ''),
maxLines: 1,
overflowWidget: const TextOverflowWidget(
position: TextOverflowPosition.middle,
child: Text(
"...",
style: AttachmentItemWidgetStyle.dotsLabelTextStyle,
),
),
style: AttachmentItemWidgetStyle.labelTextStyle,
),
child: PlatformInfo.isCanvasKit
? ExtendedText(
(attachment.name ?? ''),
maxLines: 1,
overflowWidget: const TextOverflowWidget(
position: TextOverflowPosition.middle,
child: Text(
"...",
style: AttachmentItemWidgetStyle.dotsLabelTextStyle,
),
),
style: AttachmentItemWidgetStyle.labelTextStyle,
)
: Text(
(attachment.name ?? ''),
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: AttachmentItemWidgetStyle.labelTextStyle,
)
),
const SizedBox(width: AttachmentItemWidgetStyle.space),
Text(