-
-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GeoLocation API updated and speed test added
- Loading branch information
1 parent
afdb490
commit cb7ac19
Showing
11 changed files
with
154 additions
and
73 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
{ | ||
"ip": "8.8.4.4", | ||
"success": true, | ||
"type": "IPv4", | ||
"continent": "North America", | ||
"continent_code": "NA", | ||
"country": "United States", | ||
"country_code": "US", | ||
"country_flag": "https://cdn.ipwhois.io/flags/us.svg", | ||
"country_capital": "Washington", | ||
"country_phone": "+1", | ||
"country_neighbours": "CA,MX,CU", | ||
"region": "California", | ||
"city": "Mountain View", | ||
"latitude": "37.3860517", | ||
"longitude": "-122.0838511", | ||
"asn": "AS15169", | ||
"org": "Google LLC", | ||
"isp": "Google LLC", | ||
"timezone": "America/Los_Angeles", | ||
"timezone_name": "Pacific Standard Time", | ||
"timezone_dstOffset": "0", | ||
"timezone_gmtOffset": "-28800", | ||
"timezone_gmt": "GMT -8:00", | ||
"currency": "US Dollar", | ||
"currency_code": "USD", | ||
"currency_symbol": "$", | ||
"currency_rates": "1", | ||
"currency_plural": "US dollars", | ||
"completed_requests": 0 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
GeoLocation API updated and speed test via browser added |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,39 @@ | ||
class InternetProvider { | ||
String _isp; | ||
String _ip; | ||
String _ipType; | ||
Location _location; | ||
|
||
String get isp => _isp; | ||
Location get location => _location; | ||
String get ip => _ip; | ||
String get ipType => _ipType; | ||
|
||
InternetProvider.fromMap(Map<String, dynamic> json) | ||
: _isp = json['isp'], | ||
_location = Location.fromMap(json['location']); | ||
_ip = json['ip'], | ||
_ipType = json['type'], | ||
_location = Location.fromMap(json); | ||
} | ||
|
||
class Location { | ||
String _country; | ||
String _region; | ||
String _city; | ||
double _lat; | ||
double _lng; | ||
String _lat; | ||
String _lng; | ||
String _flagUrl; | ||
|
||
String get address => _city + ', ' + _region + ', ' + _country; | ||
double get lat => _lat; | ||
double get lng => _lng; | ||
String get lat => _lat; | ||
String get lng => _lng; | ||
String get flagUrl => _flagUrl; | ||
|
||
Location.fromMap(Map<String, dynamic> json) | ||
: _country = json['country'], | ||
_region = json['region'], | ||
_city = json['city'], | ||
_lat = json['lat'], | ||
_lng = json['lng']; | ||
_lat = json['latitude'], | ||
_lng = json['longitude'], | ||
_flagUrl = json['country_flag']; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters