NetworkUtils class
Network utility functions for common network operations
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
buildUrlWithQueryParams(
String baseUrl, Map< String, String> queryParams) → String - Build URL with query parameters
-
extractDomain(
String url) → String? - Extract domain from URL
-
extractPath(
String url) → String? - Extract path from URL
-
extractPort(
String url) → int? - Extract port from URL
-
extractProtocol(
String url) → String? - Extract protocol from URL
-
extractQueryParameters(
String url) → Map< String, String> - Extract query parameters from URL
-
generateRandomIPAddress(
) → String - Generate random IP address
-
generateRandomUserAgent(
) → String - Generate random user agent string
-
getDefaultPort(
String protocol) → int? - Get common ports for protocols
-
intToIP(
int ipInt) → String - Convert integer to IP address
-
ipToInt(
String ip) → int? - Convert IP address to integer
-
isClientErrorStatusCode(
int statusCode) → bool - Check if HTTP status code indicates client error
-
isDynamicPort(
int port) → bool - Check if port is dynamic/private port
-
isHttp(
String url) → bool - Check if URL is HTTP
-
isHttps(
String url) → bool - Check if URL is HTTPS
-
isRegisteredPort(
int port) → bool - Check if port is registered port
-
isServerErrorStatusCode(
int statusCode) → bool - Check if HTTP status code indicates server error
-
isSuccessStatusCode(
int statusCode) → bool - Check if HTTP status code indicates success
-
isValidEmailDomain(
String domain) → bool - Check if string is a valid email domain
-
isValidIPAddress(
String ip) → bool - Check if string is a valid IP address
-
isValidIPv4Address(
String ip) → bool - Check if string is a valid IPv4 address
-
isValidIPv6Address(
String ip) → bool - Check if string is a valid IPv6 address
-
isValidMACAddress(
String mac) → bool - Check if string is a valid MAC address
-
isValidPort(
int port) → bool - Check if port is valid
-
isWellKnownPort(
int port) → bool - Check if port is well-known port
-
parseHttpStatusCode(
int statusCode) → Map< String, String> - Parse HTTP status code