错误:flutter/runtime/dart_vm_initializer.cc(41),未处理的异常:FormatException:意外字符(字符 1)

问题描述 投票:0回答:0

我正在尝试在此功能中显示我的经纬度信息。但我收到一个错误。在此之前,让我向您展示我的代码:

void _getLocation() {
    print("getlocation");
    _getLocationData().then((value) {
      print("get Location recall");
      print(value); // * LocationData<lat: 22.5422476, long: 113.9476589>
      print("value");
      LocationData? location = value;
      print(location);
      _getAddress(location?.latitude, location?.longitude).then((value) {
        print("in get Address");
        setState(() {
          currentLocation = location;
          address = value;
          print(address);
          print(currentLocation);
        });
      });
    });
  }

当我尝试这些代码时,我得到了一个错误,如下所示: enter image description here

flutter dart geolocation location geocode
© www.soinside.com 2019 - 2024. All rights reserved.