【发布时间】:2021-10-14 08:55:43
【问题描述】:
我想将纬度和经度转换为地址,但我不知道如何,这是我制作的代码:
void dispose() {
locationService.dispose();
super.dispose();
}
return StreamBuilder<UserLocation>(
stream: locationService.locationStream,
builder: (_, snapshot) => (snapshot.hasData) ? Scaffold(
appBar: AppBar(
title: Text("Order"),
actions: [
IconButton(onPressed: () => logout(), icon: Icon(Icons.logout))
],
),
body: ListView(
children: [
Column(
children: <Widget>[
Text("Latitude"
),
Text("${snapshot.data!.latitude}"
),
Text("Longitude"
),
Text("${snapshot.data!.longitude}"
),
我希望 snapshot.data!.latitude 和 longitude 是地址
【问题讨论】: