getIpAddress method
Get IpAddress in map format.
Implementation
@override
Future<Map<String, dynamic>> getIpAddress() async {
try {
Response<dynamic> response = await _dio.get(
"https://api64.ipify.org",
);
if (response.statusCode == 200) {
return response.data;
} else {
throw Exception('Not able to find the Ip Address.');
}
} catch (e) {
print(e.toString());
throw Exception('Not able to find the Ip Address.');
}
}