get_ip_address 0.0.6 copy "get_ip_address: ^0.0.6" to clipboard
get_ip_address: ^0.0.6 copied to clipboard

A package to get the ip address of the current device. Uses https://api64.ipify.org to get the system IP.

example/example.dart

import 'package:get_ip_address/get_ip_address.dart';

void main() async {
  try {
    /// Initialize Ip Address
    var ipAddress = IpAddress(type: 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);
  }
}
44
likes
140
pub points
97%
popularity

Publisher

unverified uploader

A package to get the ip address of the current device. Uses https://api64.ipify.org to get the system IP.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

http

More

Packages that depend on get_ip_address