port property Null safety

int port

Extracts the port from the base URL.

Implementation

int get port {
  final uri = Uri.parse(baseUrl);
  if (uri.hasPort) return uri.port;
  return isHTTPS ? 443 : 80;
}