Why can I not navigate to URL in Flutter when variable is used?

Fixed it myself. Thanks for the nudge.

I did this:

var NoWhiteSpaceURL = Googleurl.replaceAll(' ', '');
if (await canLaunch(NoWhiteSpaceURL)) {
  await launch(NoWhiteSpaceURL);
}

The problem occurs (apparently), when there is a whitespace in the URL. That is why it is giving those errors. Removing them has solved the issue for me.