Correct copy to clipboard
This commit is contained in:
parent
42c04840b8
commit
3c27d9f250
|
|
@ -8,12 +8,14 @@ class IconText extends StatelessWidget {
|
|||
this.icon,
|
||||
this.style,
|
||||
this.alignment,
|
||||
this.copyToClipboard = false,
|
||||
});
|
||||
|
||||
final String text;
|
||||
final IconData icon;
|
||||
final TextStyle style;
|
||||
final MainAxisAlignment alignment;
|
||||
final bool copyToClipboard;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
|
|
@ -24,13 +26,18 @@ class IconText extends StatelessWidget {
|
|||
Icon(icon, color: style?.color),
|
||||
SizedBox(width: 10),
|
||||
Flexible(
|
||||
child: CopyToClipboard(
|
||||
child: copyToClipboard
|
||||
? CopyToClipboard(
|
||||
value: text,
|
||||
child: Text(
|
||||
text ?? '',
|
||||
style: style,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
))
|
||||
: Text(
|
||||
text ?? '',
|
||||
style: style,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
),
|
||||
],
|
||||
|
|
|
|||
|
|
@ -376,6 +376,7 @@ class _ClientViewFullwidthState extends State<ClientViewFullwidth>
|
|||
IconText(
|
||||
text: client.privateNotes,
|
||||
icon: Icons.lock,
|
||||
copyToClipboard: true,
|
||||
)
|
||||
],
|
||||
),
|
||||
|
|
|
|||
|
|
@ -293,6 +293,7 @@ class _VendorViewFullwidthState extends State<VendorViewFullwidth>
|
|||
IconText(
|
||||
text: vendor.privateNotes,
|
||||
icon: Icons.lock,
|
||||
copyToClipboard: true,
|
||||
)
|
||||
],
|
||||
),
|
||||
|
|
|
|||
Loading…
Reference in New Issue