-
-
Notifications
You must be signed in to change notification settings - Fork 101
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Text not arranged correctly when text contain new line #1
Comments
Can you provide the code for each of your examples, and screenshots of the results? |
Hi @Cretezy, sorry for late reply. You can reproduce the bug by edit the example : And change the line with this line : |
Fixed! I just published v1.0.2. Thanks for the report! |
Hi @Cretezy , it still happening. |
Have you updated? It worked for me, I'll try again when I'm back home |
That freshly new clone from github. First I try on my project and update the version to 1.0.2, but it still happening, and then I clone it from github and run the example in case I have problem with my project. But it also happen on example |
Alright I'll take another look when I get home. Not too sure what's going on |
Alright pushed v1.0.3 with the fix for this! Was using |
Hi again @Cretezy, the bug still occure when I have several new lines. |
@apinprastya @Cretezy Same issue here, to be specific, some text like this:
it contains \n each line, it will render trim \n and place it to end of text: as you can see, original \n are gone, comes to the bottom of text. I am using the newest version......... Any updates on this? |
I'm experiencing the same as @apinprastya – any news on this? Or is the issue really closed? (thanks for the great contribution, btw) |
Hey sorry, haven't gotten to fixing this. I'll take a look into it now. |
I'm having a simliar issue that might be related to this one so I didn't want to create a new issue. When I have multiple links with \n, only the link on the first line gets humanized (I wrapped the Linkify widget creation in a function). All the links work. _makeLink( Widget _makeLink(BuildContext context, String textToLink) { Returns: |
@voivoed I'm not too sure what's wrong with the code you presented. Are you on the latest version? Can you give a full code example I can run, and the expected vs actual results? |
@Cretezy I'm using the latest version, just created a simple project to test it. import 'package:flutter/material.dart';
import 'package:flutter_linkify/flutter_linkify.dart';
void main() {
runApp(
MaterialApp(
title: "Linkify Test",
home: Home(),
),
);
}
class Home extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text("Linkify Test"),
),
body: Center(
child: Linkify(
onOpen: (url) => print("Clicked $url!"),
text: "Made by https://cretezy.com\n"
"Hosted by https:\n"
"For use with Flutter https://flutter.io",
humanize: true,
),
),
);
}
} When I run it, the first "https//" (from cretezy.com) gets removed as per the "humanize" parameter, but the next 2 (github and flutter) stay there. Here's a screenshot: I would expect to get 3 lines like this, without any "https://": Made by cretezy.com But I'm getting this, only the first "https://" is removed: Made by cretezy.com |
Ah yes, that's definitely a bug. I'll take a look soon. We'll track this in another issue though since it's related to this |
@voivoed Fixed in v1.1.1! |
@Cretezy it's working now, thanks! |
So, when the text contains new lines the text is not correctly arrange.
This text work perfect :
[text] [text with url] [text]
But this one not :
[text] [newline] [text with url] [newline] [text]
The text was updated successfully, but these errors were encountered: