Closed ABausG closed 1 year ago
@ABausG Could you provide minimal code to reproduce this issue?
Column(
children: [
StyledText.selectable(
text: '''Selectable Styled text
with <b>bold text in new line</b>''',
tags: {
'b': StyledTextTag(
style: const TextStyle(fontWeight: FontWeight.bold),
),
},
),
StyledText(
text: '''Non selectableStyled text
with <b>bold text in new line</b>''',
tags: {
'b': StyledTextTag(
style: const TextStyle(fontWeight: FontWeight.bold),
),
},
),
],
)
This produces:
@ABausG StyledText.selectable
has newLineAsBreaks
set to false, unlike regular StyledText
. Set newLineAsBreaks
to true and the widgets will behave the same:
Column(
children: [
StyledText.selectable(
newLineAsBreaks: true, // <---- !!!
text: '''Selectable Styled text
with <b>bold text in new line</b>''',
tags: {
'b': StyledTextTag(
style: const TextStyle(fontWeight: FontWeight.bold),
),
},
),
StyledText(
text: '''Non selectableStyled text
with <b>bold text in new line</b>''',
tags: {
'b': StyledTextTag(
style: const TextStyle(fontWeight: FontWeight.bold),
),
},
),
],
)
When using
StyledText.selectable
Line Breaks are not displayed.StyledText
StyledText.selectable