const_config.dart 1.3KB

123456789101112131415161718192021
  1. import 'package:amap_flutter_base/amap_flutter_base.dart';
  2. import 'package:amap_flutter_map/amap_flutter_map.dart';
  3. class ConstConfig {
  4. ///配置您申请的apikey,在此处配置之后,可以在初始化[AMapWidget]时,通过`apiKey`属性设置
  5. ///
  6. ///注意:使用[AMapWidget]的`apiKey`属性设置的key的优先级高于通过Native配置key的优先级,
  7. ///使用[AMapWidget]的`apiKey`属性配置后Native配置的key将失效,请根据实际情况选择使用
  8. static const AMapApiKey amapApiKeys = AMapApiKey(
  9. androidKey: 'b481b4187e24e625fa0056fd0530e663', iosKey: '您申请的iOS平台的key');
  10. ///高德隐私合规声明,这里只是示例,实际使用中请按照实际参数设置[AMapPrivacyStatement]的'hasContains''hasShow''hasAgree'这三个参数
  11. ///
  12. /// 注意:[AMapPrivacyStatement]的'hasContains''hasShow''hasAgree'这三个参数中有一个为false,高德SDK均不会工作,会造成地图白屏等现象
  13. ///
  14. /// 高德开发者合规指南请参考:https://lbs.amap.com/agreement/compliance
  15. ///
  16. /// 高德SDK合规使用方案请参考:https://lbs.amap.com/news/sdkhgsy
  17. static const AMapPrivacyStatement amapPrivacyStatement =
  18. AMapPrivacyStatement(hasContains: true, hasShow: true, hasAgree: true);
  19. }