|
|
|
|
14
|
static AppController t = Get.find();
|
14
|
static AppController t = Get.find();
|
15
|
GetStorage box = GetStorage();
|
15
|
GetStorage box = GetStorage();
|
16
|
final user = Rx<Person>(Person());
|
16
|
final user = Rx<Person>(Person());
|
17
|
- final location = Rxn<Map<String, Object>>();
|
|
|
|
|
17
|
+ final location = Rxn<Map<String, Object>>({'address':''});
|
18
|
final testInt = 1.obs;
|
18
|
final testInt = 1.obs;
|
19
|
|
19
|
|
20
|
AMapFlutterLocation? _location;
|
20
|
AMapFlutterLocation? _location;
|
|
|
|
|
31
|
void onLocationChange(Map<String, Object> result) {
|
31
|
void onLocationChange(Map<String, Object> result) {
|
32
|
if (box.read('token') == null) {
|
32
|
if (box.read('token') == null) {
|
33
|
location(result);
|
33
|
location(result);
|
34
|
- } else if (result['address'] == '') {
|
|
|
|
|
34
|
+ } else if (location.value!['address'] == '') {
|
35
|
setAmap({
|
35
|
setAmap({
|
36
|
//定位有问题
|
36
|
//定位有问题
|
37
|
// 'params': 'location=${result['longitude'].toString()},${result['latitude'].toString()}',
|
37
|
// 'params': 'location=${result['longitude'].toString()},${result['latitude'].toString()}',
|