getLastLocation method

Future<TencentLocation?> getLastLocation()

获取最近一次的定位结果。

Platforms:

  • 🅰️ Android:支持
  • 🍏 iOS:不支持,抛出 TencentLocationError(错误码 unsupportedOnThisPlatform
  • 🔶 Harmony:支持

Returns:

  • 最近一次的定位结果;尚未产生定位结果时返回 null

Implementation

Future<TencentLocation?> getLastLocation() =>
    _after(() => _platform.getLastLocation(_id));