问题描述
我正在使用google_maps_Flutter在我的Flutter应用中显示地图。当我启用<FlatList
style={{ marginBottom: 40 }}
data={this.state.listParam}
keyExtractor={(item,i) => i.toString()}
renderItem={({item,index}) => {
return(
<HiddenMandatoryInput
style={ style.textinput }
placeholder={item.des}
value={item.value}
mandatory={item.mandatory}
visible={item.visible}
onChangeText={(text) => this._changeText(text,item.name)}
type={item.type}
/>
)
}}
/>
时,它不会显示我的当前位置。其他google_maps_Flutter功能(例如显示标记)也可以正常工作。当我在虚拟设备上打开该应用程序时,将出现包括我的标记在内的地图。它只是不显示我的位置。
当前,我只是在Android设备上调试:Pixel 4 XL API 30; Android 11.0
我的代码:
pubspec.yaml
myLocationEnabled
AndroidManifest.xml
google_maps_Flutter: ^1.0.6
Info.plist
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
map_view.dart
<key>NSLocationWhenInUsageDescription</key>
<string>This app needs access to the phones location.</string>
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)