DebugScreen: Make the text selectable

This commit is contained in:
Vishesh Handa
2020-05-29 12:39:44 +02:00
parent cd75f6c227
commit 53ed91ff64

View File

@ -152,8 +152,8 @@ class _DebugScreenState extends State<DebugScreen> {
props.add(valueSpan); props.add(valueSpan);
}); });
return RichText( return SelectableText.rich(
text: TextSpan(children: [ TextSpan(children: [
TextSpan( TextSpan(
text: timeStr, text: timeStr,
style: textStyle.copyWith(fontWeight: FontWeight.bold)), style: textStyle.copyWith(fontWeight: FontWeight.bold)),
@ -180,7 +180,7 @@ class _DebugScreenState extends State<DebugScreen> {
var text = dt.toIso8601String().substring(0, 10); var text = dt.toIso8601String().substring(0, 10);
return Padding( return Padding(
child: Text( child: SelectableText(
text, text,
style: textStyle, style: textStyle,
textAlign: TextAlign.center, textAlign: TextAlign.center,