IPDetails class

Represents detailed information about an IP address, including location and ISP.

The IPDetails class is used to parse and hold information retrieved from geolocation APIs such as ip-api.com and iplocation.net. It includes details like country, city, ISP, latitude, longitude, and more.

Constructors

IPDetails.new({required String status, required String country, required String countryCode, required String region, required String regionName, required String city, required String zip, required String lat, required String lon, required String timezone, required String isp, required String org, required String asInfo, required String query})
Creates a new IPDetails instance with all required fields.
IPDetails.fromIpApiJson(Map<String, dynamic> json)
Creates an IPDetails instance from a JSON response from ip-api.com.
factory
IPDetails.fromIplocationFallback(Map<String, dynamic> json)
Creates an IPDetails instance from a fallback JSON response from iplocation.net.
factory

Properties

asInfo String
Autonomous System (AS) information.
final
city String
City name.
final
country String
Country name (e.g., "India").
final
countryCode String
ISO country code (e.g., "IN").
final
hashCode int
The hash code for this object.
no setterinherited
isp String
Internet Service Provider name.
final
lat String
Latitude coordinate (as a string).
final
lon String
Longitude coordinate (as a string).
final
org String
Organization name (could be the same as ISP).
final
query String
The queried IP address.
final
region String
Region code (e.g., "TN" for Tamil Nadu).
final
regionName String
Full region/state name (e.g., "Tamil Nadu").
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
status String
API response status (e.g., "success" or "fail").
final
timezone String
Timezone identifier (e.g., "Asia/Kolkata").
final
zip String
Postal or ZIP code.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
Returns a formatted string representation of the IPDetails instance.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited