Flutter 谷歌地图在颤振中放置选择器包错误
当我试图用flutter中的Flutter 谷歌地图在颤振中放置选择器包错误,flutter,google-maps,dart,google-place-picker,Flutter,Google Maps,Dart,Google Place Picker,当我试图用flutter中的google\u maps\u place\u picker包运行以下代码时,我得到了一个巨大的错误列表 import 'package:flutter/material.dart'; // import 'package:google_maps/google_maps.dart'; import 'package:google_maps/google_maps.dart'; import 'package:google_maps_place_picker/googl
google\u maps\u place\u picker
包运行以下代码时,我得到了一个巨大的错误列表
import 'package:flutter/material.dart';
// import 'package:google_maps/google_maps.dart';
import 'package:google_maps/google_maps.dart';
import 'package:google_maps_place_picker/google_maps_place_picker.dart'
as place;
// import 'package:location/location.dart';
import '../components/location_helper.dart';
// import '../components/location_helper.dart';
class MapScreen extends StatelessWidget {
final LatLng location1 = LatLng(37.657, -122.776);
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text('Map Screen'),
),
body: Center(
child: place.PlacePicker(
apiKey: GOOGLE_API,
useCurrentLocation: true,
onPlacePicked: (result) {
print(result.addressComponents);
Navigator.of(context).pop();
}),
));
}
}
错误
5:8:错误:未找到:“dart:html”导入“dart:html”显示文档,
元素、节点
错误:未找到:'dart:js'export'dart:js'show allowinetop,
异源性尿道炎
错误:未找到:“dart:js_util”导出“dart:js_util”
错误:找不到类型“Element”。
元素mapDiv[
^^^^^^^
错误:找不到类型“节点”。列表获取控件=>
^^^^
错误:找不到类型“Element”。Element\u getDiv()=>
callMethod(这个'getDiv',[])^^^^^^^
这些只是我所说的一些错误,还有更多类似的错误
我在pubspec.yaml文件中添加了这些依赖项
google_maps_flutter: ^1.2.0
geodesy: ^0.3.2
confirm_dialog: ^0.1.1
geocoding: ^1.0.5
geocoder: ^0.2.1
google_maps_place_picker: ^1.0.1
tuple: ^1.0.3
js: ^0.6.2
html: ^0.14.0+4
您正在使用
import'软件包:google_-maps/google_-maps.dart';
google\u maps package仅支持web。对于移动支持,应试用flatter\u google\u places
、google\u maps\u flatter
或任何其他软件包