@Deprecated('无法定位')
class LocationUtils {
  /// 获取 location 数据
  /* static Future<LocationData> getLocation({bool listenChanged, Function callback}) async {
    Location location = Location();
    bool _serviceEnabled;
    PermissionStatus _permissionGranted;
    LocationData _locationData;

    _serviceEnabled = await location.serviceEnabled();
    if (!_serviceEnabled) {
      _serviceEnabled = await location.requestService();
      if (!_serviceEnabled) {
        shortMessage('未开启定位服务！');
        callback(null);
        return null;
      }
    }

    _permissionGranted = await location.hasPermission();
    if (_permissionGranted == PermissionStatus.denied) {
      _permissionGranted = await location.requestPermission();
      if (_permissionGranted != PermissionStatus.granted) {
        shortMessage('未开启定位权限！');
        callback(null);
        return null;
      }
    }

    _locationData = await location.getLocation();
    if (listenChanged != null) {
      location.onLocationChanged.listen((LocationData currentLocation) {
        // Use current location
        if (callback != null) {
          callback(currentLocation);
        }
      });
    }

    callback(_locationData);
    return _locationData;
  }*/
}
