Browse Source

修改地图卡片

weicu
tanlongsheng 2 years ago
parent
commit
1fc52ca562
  1. 6
      lib/modules/chat/views/chat_navigation_card.dart

6
lib/modules/chat/views/chat_navigation_card.dart

@ -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);

Loading…
Cancel
Save