|
|
|
@ -20,10 +20,12 @@ class _ChatNavigationCardState extends State<ChatNavigationCard> { |
|
|
|
LatLng startPoint = LatLng(116.397428, 39.90923); // 起点坐标 |
|
|
|
LatLng endPoint = LatLng(116.397026, 39.903303); // 终点坐标 |
|
|
|
|
|
|
|
late Future _mapUrl; |
|
|
|
|
|
|
|
@override |
|
|
|
void initState() { |
|
|
|
super.initState(); |
|
|
|
_getMapUrl(); |
|
|
|
_mapUrl = _getMapUrl(); |
|
|
|
} |
|
|
|
|
|
|
|
Future<String> _getMapUrl() async { |
|
|
|
@ -158,7 +160,7 @@ class _ChatNavigationCardState extends State<ChatNavigationCard> { |
|
|
|
return Column( |
|
|
|
children: [ |
|
|
|
FutureBuilder( |
|
|
|
future: _getMapUrl(), |
|
|
|
future: _mapUrl, |
|
|
|
builder: (BuildContext context, AsyncSnapshot snapshot) { |
|
|
|
if (snapshot.hasData) { |
|
|
|
return Image.network(snapshot.data); |
|
|
|
|