ApiRepo class
Coordinates public-IP discovery and country/ISP provider fallbacks.
Most applications should use IpCountryLookup from the package's main
library. This class is public primarily to support custom Dio clients and
deterministic tests.
Constructors
- ApiRepo({Dio? dio, ApiRequest? request, Duration timeout = const Duration(seconds: 5)})
- Creates a repository.
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
-
getIpLocationData(
) → Future< IpCountryData> - Returns public-IP, country, and ISP information.
-
getUserIPAddress(
) → Future< String?> - Returns a validated public IPv4 or IPv6 address.
-
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