mirror of
https://github.com/Yubico/yubioath-flutter.git
synced 2024-11-29 12:22:52 +03:00
Use ellipsis overflow for subTitle
in ActionItem
This commit is contained in:
parent
21a1998946
commit
4cf5296de2
@ -65,6 +65,7 @@ class ActionListItem extends StatelessWidget {
|
||||
text: subtitle!,
|
||||
style: TextStyle(fontSize: theme.textTheme.bodyMedium!.fontSize),
|
||||
maxLines: 2,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
)
|
||||
: null,
|
||||
leading: Opacity(
|
||||
|
@ -21,12 +21,14 @@ class TooltipIfTruncated extends StatelessWidget {
|
||||
final TextStyle style;
|
||||
final String? tooltip;
|
||||
final int maxLines;
|
||||
final TextOverflow overflow;
|
||||
const TooltipIfTruncated(
|
||||
{super.key,
|
||||
required this.text,
|
||||
required this.style,
|
||||
this.tooltip,
|
||||
this.maxLines = 1});
|
||||
this.maxLines = 1,
|
||||
this.overflow = TextOverflow.fade});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
@ -35,7 +37,7 @@ class TooltipIfTruncated extends StatelessWidget {
|
||||
final textWidget = Text(
|
||||
text,
|
||||
textAlign: TextAlign.left,
|
||||
overflow: TextOverflow.fade,
|
||||
overflow: overflow,
|
||||
maxLines: maxLines,
|
||||
softWrap: maxLines != 1,
|
||||
style: style,
|
||||
|
Loading…
Reference in New Issue
Block a user