Skip to content

Commit 047870c

Browse files
committed
Replace snake_case with camelCase
1 parent f3eb4b4 commit 047870c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/src/utils/validators.dart

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ bool isURL(String? str,
3838
}
3939
int port;
4040
String? protocol, auth, user;
41-
String host, hostname, port_str, path, query, hash;
41+
String host, hostname, portStr, path, query, hash;
4242

4343
// check protocol
4444
var split = str.split('://');
@@ -96,13 +96,13 @@ bool isURL(String? str,
9696
split = hostname.split(':');
9797
host = shift(split)!;
9898
if (split.isNotEmpty) {
99-
port_str = split.join(':');
99+
portStr = split.join(':');
100100
try {
101-
port = int.parse(port_str, radix: 10);
101+
port = int.parse(portStr, radix: 10);
102102
} catch (e) {
103103
return false;
104104
}
105-
if (!RegExp(r'^[0-9]+$').hasMatch(port_str) || port <= 0 || port > 65535) {
105+
if (!RegExp(r'^[0-9]+$').hasMatch(portStr) || port <= 0 || port > 65535) {
106106
return false;
107107
}
108108
}

0 commit comments

Comments
 (0)