Comments (2)
Hey @SatyamKr07
I suggest to verify your link prior to passing it to the LinkPreview.
However, Let me run this & see what is the error that we are getting.
I will be releasing a new version before this weekend & you can expect a fix in the same.
Thanks mate
from any_link_preview.
@SatyamKr07 Pass the Key
to the LinkPreview widget & your issue will be solved.
Something like key: Key(linkUrlController.text.toString())
class VerifyLinkUI extends StatefulWidget {
@override
_VerifyLinkUIState createState() => _VerifyLinkUIState();
}
class _VerifyLinkUIState extends State {
TextEditingController linkUrlController = TextEditingController();
@override
Widget build(BuildContext context) {
return Column(
children: [
Padding(
padding: const EdgeInsets.all(8.0),
child: TextField(
controller: linkUrlController,
decoration: const InputDecoration(
hintText: "Paste link of google drive,google docs,youtube etc",
hintStyle: TextStyle(fontSize: 12)),
onChanged: (value) {
setState(() {
print(
'linkUrlController is ============= ${linkUrlController.text}');
});
},
),
),
Padding(
padding: const EdgeInsets.all(8.0),
child: AnyLinkPreview(
key: Key(linkUrlController.text.toString()),
link: linkUrlController.text,
displayDirection: UIDirection.UIDirectionHorizontal,
showMultimedia: true,
bodyMaxLines: 5,
bodyTextOverflow: TextOverflow.ellipsis,
titleStyle: const TextStyle(
color: Colors.black,
fontWeight: FontWeight.bold,
fontSize: 15,
),
bodyStyle: const TextStyle(color: Colors.grey, fontSize: 12),
errorBody: 'Show my custom error body',
errorTitle: 'Show my custom error title',
errorWidget: Container(
color: Colors.grey[300],
child: const Text('Oops!'),
),
errorImage: "https://google.com/",
cache: const Duration(days: 7),
backgroundColor: Colors.grey[300],
borderRadius: 0,
removeElevation: false,
boxShadow: const [BoxShadow(blurRadius: 3, color: Colors.grey)],
onTap: () {}, // This disables tap event
),
),
],
);
}
}
`
from any_link_preview.
Related Issues (20)
- Misstype code HOT 2
- Url which does have 2 or more dot inside it does not work
- Is there a way to increase preview image height in Vertical direction? HOT 3
- Multimedia doesn't open HOT 7
- Error while using www. in the twitter url HOT 4
- link preview error on using medium.com url HOT 2
- Can't get domain name of websites HOT 3
- A bug in any_link_preview package HOT 9
- Why am I getting some weird images, weird titles and weird body text from links? HOT 1
- Error on most url preview in web configuration HOT 1
- Is possible to choose when parse OG and when HTML? HOT 3
- Is there a way to get rid of Error on NetworkImageLoadException for a HTTP request failed statusCode: 404? HOT 1
- Preview and getMetadata function aren't working with TikTok URL HOT 1
- Error while retrieving cache data HOT 5
- Google News link return Google News icon instead of article image HOT 1
- Crashes, when parsing fails for image with is not a network image or something else HOT 2
- Preview function aren't working with ZOZOTOWN URL HOT 2
- Error in CacheManager.getJson(String key) HOT 1
- Feature Request: onError callback HOT 3
- Provide support for SVG extension to load thumbnail. HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from any_link_preview.