Fix ellipsis issue in Released at line

This commit is contained in:
franzap
2026-02-06 17:54:16 -03:00
parent 8ddef19cae
commit 365f2b98c2
+21 -35
View File
@@ -59,44 +59,30 @@ class DownloadTextContainer extends StatelessWidget {
);
}
// With onTap: make only the URL portion (icon + path) tappable
return Text.rich(
TextSpan(
children: [
TextSpan(text: beforeText, style: baseStyle),
const TextSpan(text: ' '),
WidgetSpan(
alignment: PlaceholderAlignment.middle,
child: InkWell(
onTap: onTap,
borderRadius: BorderRadius.circular(8),
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 4, vertical: 2),
child: Row(
mainAxisSize: MainAxisSize.min,
children: [
if (iconWidget != null) ...[
iconWidget,
const SizedBox(width: 4),
],
Flexible(
child: Text(
pathText,
style: boldStyle,
overflow: oneLine ? TextOverflow.ellipsis : TextOverflow.visible,
maxLines: oneLine ? 1 : null,
),
),
],
// With onTap: use same TextSpan layout (avoids WidgetSpan intrinsic sizing
// issues with Flexible/Row) and wrap in GestureDetector for tap handling.
return GestureDetector(
onTap: onTap,
child: Text.rich(
TextSpan(
children: [
TextSpan(text: beforeText, style: baseStyle),
const TextSpan(text: ' '),
if (iconWidget != null)
WidgetSpan(
alignment: PlaceholderAlignment.middle,
child: Padding(
padding: const EdgeInsets.only(right: 4),
child: iconWidget,
),
),
),
),
],
TextSpan(text: pathText, style: boldStyle),
],
),
softWrap: !oneLine,
overflow: oneLine ? TextOverflow.ellipsis : TextOverflow.visible,
maxLines: oneLine ? 1 : null,
),
softWrap: !oneLine,
overflow: oneLine ? TextOverflow.ellipsis : TextOverflow.visible,
maxLines: oneLine ? 1 : null,
);
}