Closed Larens94 closed 3 years ago
same
flutter: ══╡ EXCEPTION CAUGHT BY WIDGETS LIBRARY ╞═══════════════════════════════════════════════════════════ flutter: The following assertion was thrown building SelectableText(scrollPhysics: flutter: NeverScrollableScrollPhysics, dirty, state: _SelectableTextState#14ce5): flutter: SelectableText only supports TextSpan; Other type of InlineSpan is not allowed flutter: 'package:flutter/src/material/selectable_text.dart': flutter: Failed assertion: line 560 pos 12: '() { flutter: return _controller._textSpan.visitChildren((InlineSpan span) => span.runtimeType == TextSpan); flutter: }()' flutter: flutter: Either the assertion indicates an error in the framework itself, or we should provide substantially flutter: more information in this error message to help you determine and fix the underlying cause. flutter: In either case, please report this assertion by filing a bug on GitHub: flutter: https://github.com/flutter/flutter/issues/new?template=2_bug.md flutter: flutter: The relevant error-causing widget was: flutter: SelectableLinkify
I have requested a pull request with the fix for this issue, until then you can use my fork as your package to bypass this issue.
flutter_linkify:
git:
url: https://github.com/MohamedEL-Torky/flutter_linkify
@MohamedEL-Torky God was here...
@MohamedEL-Torky Thanks!!
Hello MohamedEL-Torky This solves the issue, thanks.
But there is still this issue with selectableLinkify : "textScaleFactor" is not handled :(
@deacon78 I've updated my fork for your use case, now you can use textScaleFactor inside SelectableLinkify. Do flutter clean then flutter pub get and tell me if you face any problems.
Mohamed, thank you very much
You're very welcome anytime.
Sorry but this still doesn't work
SelectableLinkify( onOpen: (link) async { if (await canLaunch(link.url)) { await launch(link.url); } else { throw 'Could not launch $link'; } }, text: this.entretien.noteEntretien, textScaleFactor: 1.0,//not handled :( style:TextStyle(fontFamily: "BerlinSansFBRegular",fontSize: getFontSize(1,context),), options: LinkifyOptions(humanize: false),//pour afficher le http ),
I got the error : textScaleFactor isn't defined
This seems to be a local cache issue, try removing the package from the pubspec.yaml and then do flutter clean and then flutter pub get, after that add the package again in the pubspec and do a flutter pub get.
It works with your tip.
A big thank you !
@MohamedEL-Torky Your fix worked with our app too, but I noticed, the resulting text size is quite small, I don't think it follows the rest of the app. I may be wrong tho. Could there be any reason for this? Btw, as many have said before me, thank you for this fix, I hope your PR gets merged soon.
This appears to be fixed with #80, which has a remaining requested change. Will merge ASAP
@Cretezy Thank you for the package. I just tested the latest version released few hours ago and this issue of SelectableLinkifyError still remain unfixed.
can you please look into the current pull request? The issue was fixed in that pull request and I would have used it but it seems to have a conflict with one of the packages am using. Thank you
@Aanu1995 See my previous comment, PR #80 has comments to be addressed before merging. As soon as they are fixed, I will deploy a new version
Just released 5.0.2 with this a fix for this.
Hi, why are you sending me this error?
The following assertion was thrown building SelectableText(dirty, state: _SelectableTextState#d1317): SelectableText only supports TextSpan; Other type of InlineSpan is not allowed 'package:flutter/src/material/selectable_text.dart': Failed assertion: line 560 pos 12: '() { return _controller._textSpan.visitChildren((InlineSpan span) => span.runtimeType == TextSpan); }()'![Schermata 2021-03-07 alle 16 03 12](https://user-images.githubusercontent.com/32598073/110244353-a06bba00-7f5e-11eb-959a-34c0399bdcea.png)