Source
static Filter hasAllowedScheme(String attribute, Iterable<String> schemes) => (t, o) { var uri = o[attribute]; if (uri == null || !isValid(uri)) { return false; } var scheme = Uri.parse(uri).scheme; return scheme.isEmpty || schemes.contains(scheme); };