isOpenableLink static method

bool isOpenableLink(
  1. String url
)

Web links need a host; app deep links (medihub://cart) only a safe scheme. Browsers drop control characters inside a scheme (java\nscript:), so this does too before parsing. Port of Android GameLinkPolicy (check and open decide on the same canonical string).

Implementation

static bool isOpenableLink(String url) => openableLink(url) != null;