navigate method

Future<Online> navigate(
  1. String url, {
  2. bool show = true,
})

Implementation

Future<Online> navigate(String url, {bool show = true}) async {
  // clean up url to make sure it is valid
  if (!url.startsWith('http')) {
    url = 'https://$url';
  }
  //handle # ? and other special characters
  url = Uri.encodeFull(url);

  if (show) Show.visiting(url);
  await (await page).goto(url, wait: Until.load);
  return this;
}