Multiline text
Multiline text doesn't work as expected.
Tested on 4.0.2 and 4.1.0.
Linkify(
onOpen: (link) async => await canLaunch(link.url) && await launch(link.url),
text: channel.description,
options: LinkifyOptions(
defaultToHttps: false,
humanize: false,
removeWww: false,
excludeLastPeriod: false,
looseUrl: false,
),
),
Input text in the text field, displayed text at the bottom of the screen

I also tried the sample content Made by https://cretezy.com\n\nMail: [email protected], and it doesn't work as expected.
Works fine with 3.1.3
I'm having the same problem... if there are new lines in the text input, the linkified text output is displayed all over the place, not even in the right line order.
I can't downgrade to 3.1.3 because that is not properly handling the excludelastperiod property... so every word at the end of a sentence is being linkified. Rather in a bind here... thanks so much.
(but thanks so much for creating the code package... super helpful! Albeit right now I can't release my app because of this bug... would really appreciate any help!)
Works fine with 3.1.3
With 3.1.3 alos it doesn't work for me.
not accepting \n (new line).
Hi For the time being you can use his hack. It's working for me
String getFinalString(String text) { var finalString = ""; if (text.contains("\n")) { var des = text.split("\n"); des.forEach((desc) { finalString = finalString.isEmpty ? finalString + desc : finalString + " \n" + desc; }); } else finalString = text;
return finalString;
}
For me @softuvo 's solution also didnt work. However, I extended his solution and created a different version of it. This should work in all cases:
`Widget _buildLineSeparatedLinkableTexts(String text) { var textLines = text.split("\n"); final lineTexts = textLines.map((line) { return Padding( padding: const EdgeInsets.only(bottom: 5.0), child: Linkify( onOpen: _onOpen, text: line, style: TextStyle( fontSize: 16.0, color: Colors.white, ), ), ); }).toList();
return SingleChildScrollView(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: lineTexts,
),
);
}`