我正在使用 google_maps_flutter,E/AccesibilityNodeInfo (17886) 的日志太吵了,拒绝尝试创建自己的子视图
它还没有引起任何错误,应用程序运行良好我只是想知道为什么即使我没有在屏幕上做任何事情也会不断显示消息。
import 'dart:async';
import 'package:flutter/material.dart';
import 'package:google_maps_flutter/google_maps_flutter.dart';
import '../../models/place.dart';
class MapScreen extends StatefulWidget {
final bool isSelecting;
final PlaceLocation initialLocation;
MapScreen({
this.isSelecting = false,
this.initialLocation =
const PlaceLocation(latitude: 37.422, longitude: -122.084),
});
@override
_MapScreenState createState() => _MapScreenState();
}
class _MapScreenState extends State<MapScreen> {
Completer<GoogleMapController> _mapController = Completer();
LatLng _pickedLocation;
void _selectLocation(LatLng position) {
setState(() {
_pickedLocation = position;
});
}
@override
Widget build(BuildContext context) {
return new Scaffold(
appBar: AppBar(
title: Text('Map'),
actions: [
IconButton(
icon: Icon(Icons.check),
onPressed: () {},
),
],
),
body: GoogleMap(
onMapCreated: (controller) {
_mapController.complete(controller);
},
initialCameraPosition: CameraPosition(
target: LatLng(
widget.initialLocation.latitude,
widget.initialLocation.longitude,
),
zoom: 16,
),
myLocationEnabled: true,
myLocationButtonEnabled: true,
onTap: widget.isSelecting ? _selectLocation : null,
markers: _pickedLocation == null
? null
: {
Marker(
markerId: MarkerId('1'),
position: _pickedLocation,
),
},
),
);
}
}
这是我正在使用的代码