get_ip_address 0.0.1 get_ip_address: ^0.0.1 copied to clipboard
A flutter package to get the ip address
import 'package:get_ip_address/get_ip_address.dart';
void main() async {
try {
/// Initialize Ip Address
var ipAddress = IpAddress(requestType: RequestType.json);
/// Get the IpAddress based on requestType.
dynamic data = await ipAddress.getIpAddress();
print(data.toString());
} on IpAddressException catch (exception) {
/// Handle the exception.
print(exception.message);
}
}