addHttps method

String addHttps()

Adds https:// to the link if it does not contain https:// or http:// already.

This is helpful to make a link openable when using the url_launcher package for example.

Implementation

String addHttps() {
  return contains('https://') || contains('http://') ? this : 'https://$this';
}