Home > Software engineering >  How can i get the favicon url from a website url using flutter
How can i get the favicon url from a website url using flutter

Time:10-30

assume someone gives me the URL of google. now I need to find the favicon URL of Google.

CodePudding user response:

For the most ways you can just add favicon.ico to the sites urls, for example https://google.com/favicon.ico, but sometimes it won't work, so you can use favicon library:

var iconUrl = await FaviconFinder.getBest('https://stackoverflow.com/');
print(iconUrl!.url); // http://stackoverflow.com/favicon.ico
  • Related