Your launchURL(blogModel.url) call returns Future, and onTap needs a void.
There are 2 solutions to fix this problem.
-
onTap: () => launchURL(blogModel.url), -
onTap: () { launchURL(blogModel.url); // here you can also use async-await }
Your launchURL(blogModel.url) call returns Future, and onTap needs a void.
There are 2 solutions to fix this problem.
onTap: () => launchURL(blogModel.url),
onTap: () {
launchURL(blogModel.url); // here you can also use async-await
}