seeip_client 0.1.1

  • Readme
  • Changelog
  • Example
  • Installing
  • 79

seeip client #

A library that makes it easy to fetch data from SeeIP - A simple IP address API.

This is a pure Dart library which relies on the http package. Therefore, it can be used cross-platform, from Flutter to Web to server-side.

Usage #

You can fetch data from SeeIP without any api or auth tokens. Simply create an instance of the SeeipClient class.

Please see example/seeip_client_example.dart for moe examples.

import 'package:seeip_client/seeip_client.dart';

main() async {
  SeeipClient seeip = SeeipClient();

  OnlyIP ipaddress = await seeip.getIP();


Features and bugs #

Please file feature requests and bugs at the issue tracker.

0.1.1 #

  • Bug fix - Added parsing for int Lat/Long coordinates.

0.1.0 #

  • Initial version, created by Mad About Brighton.


// Copyright (c) 2019, Mad About Brighton. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

import 'package:seeip_client/seeip_client.dart';

main() async {
  SeeipClient seeip = SeeipClient();

  // Fetches only the IP address of the requesting device.
  OnlyIP ip = await seeip.getIP();


  // Fetches only the IPv4 address of the requesting device.
  OnlyIP ipv4 = await seeip.getIPv4();


  // Fetches the Geo IP of the requesting device.
  GeoIP geoIP = await seeip.getGeoIP();


  // Fetches the Geo IP of the specified IP address.
  GeoIP geoIPSpecific = await seeip.getGeoIP('');


Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:

  seeip_client: ^0.1.1

2. Install it

You can install packages from the command line:

with pub:

$ pub get

with Flutter:

$ flutter pub get

Alternatively, your editor might support pub get or flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

import 'package:seeip_client/seeip_client.dart';
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

We analyzed this package on Feb 27, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.7.1
  • pana: 0.13.5

Health suggestions

Fix lib/src/client.dart. (-2.48 points)

Analysis of lib/src/client.dart reported 5 hints:

line 68 col 7: DO use curly braces for all flow control structures.

line 68 col 13: Unnecessary new keyword.

line 120 col 15: Unnecessary new keyword.

line 120 col 34: Unnecessary new keyword.

line 128 col 15: Unnecessary new keyword.

Format lib/src/models/geo_ip.dart.

Run dartfmt to format lib/src/models/geo_ip.dart.

Format lib/src/models/only_ip.dart.

Run dartfmt to format lib/src/models/only_ip.dart.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
http ^0.12.0+2 0.12.0+4
Transitive dependencies
async 2.4.0
charcode 1.1.3
collection 1.14.12
http_parser 3.1.3
meta 1.1.8
path 1.6.4
source_span 1.6.0
string_scanner 1.0.5
term_glyph 1.1.0
typed_data 1.1.6
Dev dependencies
mockito ^4.0.0
pedantic ^1.0.0 1.9.0
test ^1.0.0