TF-265 Remove prefix https:// in url login form
This commit is contained in:
@@ -13,4 +13,16 @@ extension URLExtension on String {
|
||||
return '$prefixUrlHttps${this}';
|
||||
}
|
||||
}
|
||||
|
||||
String removePrefix() {
|
||||
if (startsWith(prefixUrlHttps)) {
|
||||
return replaceAll(prefixUrlHttps, '');
|
||||
} else if (startsWith(prefixUrlHttp)) {
|
||||
return replaceAll(prefixUrlHttp, '');
|
||||
} else {
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
bool isValid() => startsWith(prefixUrlHttps) || startsWith(prefixUrlHttp);
|
||||
}
|
||||
Reference in New Issue
Block a user