flutter_google_places自动完成功能会偶尔显示搜索结果

时间:2019-08-30 09:46:51

标签: flutter

我正在使用flutter_google_places:^ 0.2.3并实现了场所自动完成功能,但是很少显示搜索结果。尝试多次后约10-30分钟一次显示结果。我已启用api密钥和互联网权限日志显示为-BufferQueueProducer(31832):SurfaceTexture-0-31832-4 cancelBuffer:插槽1

 TextField(
                       decoration: InputDecoration(
                           hintText: _hintPickUpPlace,
                           border: InputBorder.none,
                           icon: Icon(Icons.search,color: Colors.white,),
                           hintStyle: TextStyle(fontSize: 18,color: Colors.white,fontWeight: FontWeight.bold)
                       ),
                       onTap: (){
                         showGooglePlaceWidget();
                         _state = States.pickUpSate;
                       },
                     )

 Future<void> showGooglePlaceWidget() async
  {
              Prediction p = await PlacesAutocomplete.show(

                context: context,
                apiKey: kGoogleApiKey,
                mode: Mode.overlay,
                language: "en",
                radius: _center == null ? null : 10000000
            );
}

0 个答案:

没有答案