port property
The value of the port part of the hostHeader header, if any.
Implementation
int? get port {
final host = value('host');
if (host == null) return null;
final uri = Uri.tryParse('http://$host');
if (uri == null) return null;
return uri.port;
}
The value of the port part of the hostHeader header, if any.
Implementation
set port(int? v) {
if (v != null) {
set('host', '$host:$v');
} else {
final host = value('host');
if (host != null) {
final uri = Uri.tryParse('http://$host');
if (uri != null) {
set('host', uri.host);
}
}
}
}