IpDetector class
IpDetector class :
A class for detecting IP information using an API.
The IpDetector class allows you to retrieve details about the current user's IP address, such as country, region, city, etc., by making requests to an external API.
Constructors
- IpDetector.new({Duration? timeout = const Duration(seconds: 30)})
- IpDetector Constructor :
Properties
- getResponse → IpDetectorResponseModel?
-
getResponse Getter Method :
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- timeout → Duration?
-
timeout : The timeout duration for API requests.
final
Methods
-
as(
) → String? - as Method :
-
city(
) → String? - city Method :
-
country(
) → String? - country Method :
-
countryCode(
) → String? - countryCode Method :
-
fetch(
{bool? enableLog = false}) → Future< IpDetectorResponseModel> - fetch Method :
-
isp(
) → String? - isp Method :
-
lat(
) → String? - lat Method :
-
lon(
) → String? - lon Method :
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
org(
) → String? - org Method :
-
query(
) → String? - query Method :
-
region(
) → String? - region Method :
-
regionName(
) → String? - regionName Method :
-
responseHasError(
String errorMessage, [bool? enableLog = false]) → IpDetectorResponseModel - responseHasError Method :
-
responseHasResult(
Map< String, dynamic> data, [bool? enableLog = false]) → IpDetectorResponseModel - responseHasResult Method :
-
setResponse(
IpDetectorResponseModel? value) → dynamic - setResponse Method :
-
timezone(
) → String? - timezone Method :
-
toString(
) → String -
A string representation of this object.
inherited
-
type(
) → IpDetectorResponseType? - type Method :
-
zip(
) → String? - zip Method :
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited