Closed ROCKWAR closed 2 years ago
@ROCKWAR Please provide a minimum code to reproduce the problem.
// Just put this container in a Flutter application and you will see that it only prints the NULL value, when it should be: [1↑]
Container(
padding: const EdgeInsets.symmetric(horizontal: 10),
child: StyledText.selectable(
toolbarOptions: const ToolbarOptions(copy: true),
style: const TextStyle(fontSize: 18),
text: "A text
@ROCKWAR Please use the back tick to decorate the code, now I don't see where the "f" tag is located.
// Just put this container in a Flutter application and you will see
// that it only prints the NULL value, when it should be: [1↑]
Container(
padding: const EdgeInsets.symmetric(horizontal: 10),
child: StyledText.selectable(
toolbarOptions: const ToolbarOptions(copy: true),
style: const TextStyle(fontSize: 18),
text: "A text <f>[1↑]</f>",
newLineAsBreaks: true,
tags: {
'f': StyledTextActionTag(
(texto, attr) {
print('Texto value = $texto'); // texto = null
// I should receive the value [1↑] when I click
},
),
},
),
),
@ROCKWAR This is a bug and has already been fixed in StyledText ^3.0.4.
Before this worked well on version 1.0.1:
'f': ActionTextStyle( onTap: (TextSpan texto, Map<String, String> attrs) => _openRef(context, texto, attrs), ),
Now, on version 3.03; texto does not receive or returns anything : 'f': StyledTextActionTag( (texto, _) { selectRef = true; print('SELECCIONADO REFERENCIA, valor = $texto'); //texto = null _openRef(context, texto); }, ),
I need help please. I need to get the value within a text </ f> and then process it on my own.
Thanks