IpCountryData class
Country and network information associated with a public IP address.
Values are mutable for compatibility with the 1.0.x API. New code should use the camelCase properties; deprecated snake_case aliases remain available for migration.
Constructors
- IpCountryData({String? ip, String? ipNumber, @Deprecated('Use ipNumber instead.') String? ip_number, String? ipVersion, @Deprecated('Use ipVersion instead.') String? ip_version, String? countryName, @Deprecated('Use countryName instead.') String? country_name, String? countryCode, @Deprecated('Use countryCode instead.') String? country_code, String? isp, String? responseCode, @Deprecated('Use responseCode instead.') String? response_code, String? responseMessage, @Deprecated('Use responseMessage instead.') String? response_message})
- Creates an IP country lookup result.
- IpCountryData.fromJson(String source)
-
Decodes a result from a JSON object accepted by fromMap.
factory
-
IpCountryData.fromMap(Map<
String, dynamic> map) -
Creates a result from camelCase or supported provider-style map keys.
factory
Properties
- country_code ↔ String?
-
Deprecated alias for countryCode.
getter/setter pair
- country_name ↔ String?
-
Deprecated alias for countryName.
getter/setter pair
- countryCode ↔ String?
-
The two-letter ISO 3166-1 country code associated with ip.
getter/setter pair
- countryName ↔ String?
-
The country name associated with ip.
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- ip ↔ String?
-
The public IPv4 or IPv6 address used for the location lookup.
getter/setter pair
- ip_number ↔ String?
-
Deprecated alias for ipNumber.
getter/setter pair
- ip_version ↔ String?
-
Deprecated alias for ipVersion.
getter/setter pair
- ipNumber ↔ String?
-
The provider's numeric representation of ip, when available.
getter/setter pair
- ipVersion ↔ String?
-
The IP version, normally
'4'or'6'.getter/setter pair - isp ↔ String?
-
The Internet service provider or network organization, when available.
getter/setter pair
- response_code ↔ String?
-
Deprecated alias for responseCode.
getter/setter pair
- response_message ↔ String?
-
Deprecated alias for responseMessage.
getter/setter pair
- responseCode ↔ String?
-
The normalized lookup status code.
getter/setter pair
- responseMessage ↔ String?
-
A provider message,
'OK'on normalized success, or a failure summary.getter/setter pair - 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
-
toJson(
) → String - Encodes this result as a JSON object using the keys from toMap.
-
toMap(
) → Map< String, dynamic> - Converts this value to the wire-compatible map used in earlier releases.
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited