|
|
@@ -6,6 +6,7 @@ import 'package:bbyyy/beans/new_msg_bean_entity.dart';
|
|
|
import 'package:bbyyy/my_tools/easy_loading/easy_loading.dart';
|
|
|
import 'package:convert/convert.dart';
|
|
|
import 'package:crypto/crypto.dart';
|
|
|
+import 'package:dio/dio.dart';
|
|
|
import 'package:flutter/material.dart';
|
|
|
import 'package:flutter/services.dart';
|
|
|
import 'package:flutter_image_compress/flutter_image_compress.dart';
|
|
|
@@ -268,3 +269,13 @@ numberComplement(String s) {
|
|
|
String hideUID(String uid){
|
|
|
return uid.replaceRange(0, 4, '****');
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+getAddressByLatitudeAndLongitude(double latitude, double longitude){
|
|
|
+ print('getAddressByLatitudeAndLongitude');
|
|
|
+ print('https://restapi.amap.com/v3/geocode/regeo?output=xml&location=$longitude,$latitude&key=5dcd9f0ed7d51aefb5b2f73dba1069cb&radius=1000&extensions=all∑');
|
|
|
+ Dio().get('https://restapi.amap.com/v3/geocode/regeo?output=json&location=$longitude,$latitude&key=5dcd9f0ed7d51aefb5b2f73dba1069cb&radius=1000&extensions=all').then((value) {
|
|
|
+ print(value);
|
|
|
+ });
|
|
|
+}
|