release: 1.0.1

This commit is contained in:
Kuloud 2023-12-29 22:16:21 +08:00
parent 5ecf421da4
commit 595930067f
18 changed files with 3 additions and 35 deletions

View File

@ -34,7 +34,6 @@ class _BodyState extends State<_Body> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
final AMapWidget map = AMapWidget( final AMapWidget map = AMapWidget(
apiKey: ConstConfig.amapApiKeys,
rotateGesturesEnabled: _rotateGesturesEnabled, rotateGesturesEnabled: _rotateGesturesEnabled,
scrollGesturesEnabled: _scrollGesturesEnabled, scrollGesturesEnabled: _scrollGesturesEnabled,
tiltGesturesEnabled: _tiltGesturesEnabled, tiltGesturesEnabled: _tiltGesturesEnabled,

View File

@ -38,7 +38,6 @@ class _BodyState extends State<_Body> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
final AMapWidget map = AMapWidget( final AMapWidget map = AMapWidget(
apiKey: ConstConfig.amapApiKeys,
trafficEnabled: _trafficEnabled, trafficEnabled: _trafficEnabled,
buildingsEnabled: _buildingsEnabled, buildingsEnabled: _buildingsEnabled,
compassEnabled: _compassEnabled, compassEnabled: _compassEnabled,

View File

@ -25,7 +25,6 @@ class _BodyState extends State<_Body> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
final AMapWidget amap = AMapWidget( final AMapWidget amap = AMapWidget(
apiKey: ConstConfig.amapApiKeys,
onMapCreated: _onMapCreated, onMapCreated: _onMapCreated,
onCameraMove: _onCameraMove, onCameraMove: _onCameraMove,
onCameraMoveEnd: _onCameraMoveEnd, onCameraMoveEnd: _onCameraMoveEnd,

View File

@ -23,7 +23,6 @@ class _BodyState extends State<_Body> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
final AMapWidget amap = AMapWidget( final AMapWidget amap = AMapWidget(
apiKey: ConstConfig.amapApiKeys,
touchPoiEnabled: true, touchPoiEnabled: true,
onPoiTouched: _onPoiTouched, onPoiTouched: _onPoiTouched,
); );

View File

@ -31,7 +31,6 @@ class _SnapShotState extends State<_SnapShotBody> {
children: <Widget>[ children: <Widget>[
Expanded( Expanded(
child: AMapWidget( child: AMapWidget(
apiKey: ConstConfig.amapApiKeys,
onMapCreated: _onMapCreated, onMapCreated: _onMapCreated,
), ),
), ),

View File

@ -38,7 +38,6 @@ class _PageBodyState extends State<_PageBody> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
// //
final AMapWidget map = AMapWidget( final AMapWidget map = AMapWidget(
apiKey: ConstConfig.amapApiKeys,
// //
mapType: _mapType, mapType: _mapType,
); );

View File

@ -48,7 +48,6 @@ class _CustomMapStyleState extends State<_CustomMapStyleBody> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
final AMapWidget map = AMapWidget( final AMapWidget map = AMapWidget(
apiKey: ConstConfig.amapApiKeys,
onMapCreated: onMapCreated, onMapCreated: onMapCreated,
customStyleOptions: _customStyleOptions, customStyleOptions: _customStyleOptions,
); );

View File

@ -22,7 +22,6 @@ class _BodyState extends State<_Body> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
final AMapWidget amap = AMapWidget( final AMapWidget amap = AMapWidget(
apiKey: ConstConfig.amapApiKeys,
limitBounds: LatLngBounds( limitBounds: LatLngBounds(
southwest: LatLng(39.83309, 116.290176), southwest: LatLng(39.83309, 116.290176),
northeast: LatLng(39.99951, 116.501663)), northeast: LatLng(39.99951, 116.501663)),

View File

@ -87,9 +87,6 @@ class _MapUiBodyState extends State<_MapUiBody> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
final AMapWidget map = AMapWidget( final AMapWidget map = AMapWidget(
///SDK不会工作
// privacyStatement: ConstConfig.amapPrivacyStatement,
// apiKey: ConstConfig.amapApiKeys,
initialCameraPosition: _kInitialPosition, initialCameraPosition: _kInitialPosition,
mapType: _mapType, mapType: _mapType,
trafficEnabled: _trafficEnabled, trafficEnabled: _trafficEnabled,

View File

@ -37,7 +37,6 @@ class _BodyState extends State<_Body> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
final AMapWidget amap = AMapWidget( final AMapWidget amap = AMapWidget(
apiKey: ConstConfig.amapApiKeys,
myLocationStyleOptions: MyLocationStyleOptions( myLocationStyleOptions: MyLocationStyleOptions(
true, true,
circleFillColor: Colors.lightBlue, circleFillColor: Colors.lightBlue,

View File

@ -25,7 +25,6 @@ class _BodyState extends State<_Body> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
final AMapWidget amap = AMapWidget( final AMapWidget amap = AMapWidget(
apiKey: ConstConfig.amapApiKeys,
onMapCreated: _onMapCreated, onMapCreated: _onMapCreated,
onCameraMove: _onCameraMove, onCameraMove: _onCameraMove,
onCameraMoveEnd: _onCameraMoveEnd, onCameraMoveEnd: _onCameraMoveEnd,

View File

@ -22,7 +22,6 @@ class _ShowMapPageState extends State<_ShowMapPageBody> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
final AMapWidget map = AMapWidget( final AMapWidget map = AMapWidget(
apiKey: ConstConfig.amapApiKeys,
onMapCreated: onMapCreated, onMapCreated: onMapCreated,
); );

View File

@ -65,7 +65,6 @@ class _BodyState extends State<_Body> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
final AMapWidget amap = AMapWidget( final AMapWidget amap = AMapWidget(
apiKey: ConstConfig.amapApiKeys,
// //marker属性赋值一个空的setmarker // //marker属性赋值一个空的setmarker
markers: Set<Marker>.of(_markers.values), markers: Set<Marker>.of(_markers.values),
); );

View File

@ -32,7 +32,6 @@ class _BodyState extends State<_Body> {
} }
final AMapWidget amap = AMapWidget( final AMapWidget amap = AMapWidget(
apiKey: ConstConfig.amapApiKeys,
markers: Set<Marker>.of(_initMarkerMap.values), markers: Set<Marker>.of(_initMarkerMap.values),
); );
return Container( return Container(

View File

@ -243,7 +243,6 @@ class _State extends State<_Body> {
// _createMarkerImageFromBytes(context); // _createMarkerImageFromBytes(context);
final AMapWidget map = AMapWidget( final AMapWidget map = AMapWidget(
apiKey: ConstConfig.amapApiKeys,
onMapCreated: _onMapCreated, onMapCreated: _onMapCreated,
markers: Set<Marker>.of(_markers.values), markers: Set<Marker>.of(_markers.values),
); );

View File

@ -75,7 +75,6 @@ class _BodyState extends State<_Body> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
_initMarker(context); _initMarker(context);
final AMapWidget amap = AMapWidget( final AMapWidget amap = AMapWidget(
apiKey: ConstConfig.amapApiKeys,
markers: Set<Marker>.of(_initMarkerMap.values), markers: Set<Marker>.of(_initMarkerMap.values),
); );
return Container( return Container(

View File

@ -4,10 +4,6 @@ typedef void MapCreatedCallback(AMapController controller);
///Widget ///Widget
class AMapWidget extends StatefulWidget { class AMapWidget extends StatefulWidget {
///key
@Deprecated('高德开放平台的key请通过AMapInitializer初始化设置将在1.0.1+移除')
final AMapApiKey? apiKey;
/// ///
final CameraPosition initialCameraPosition; final CameraPosition initialCameraPosition;
@ -89,12 +85,6 @@ class AMapWidget extends StatefulWidget {
/// ///
final Set<Factory<OneSequenceGestureRecognizer>> gestureRecognizers; final Set<Factory<OneSequenceGestureRecognizer>> gestureRecognizers;
///
///
/// SDK合规使用方案请参考https://lbs.amap.com/news/sdkhgsy
@Deprecated('高德开放平台的key请通过AMapInitializer初始化设置将在1.0.1+移除')
final AMapPrivacyStatement? privacyStatement;
/// widget /// widget
/// ///
/// app首次启动时必须传入高德合规声明配置[privacyStatement], /// app首次启动时必须传入高德合规声明配置[privacyStatement],
@ -108,9 +98,6 @@ class AMapWidget extends StatefulWidget {
/// [AssertionError] will be thrown if [initialCameraPosition] is null; /// [AssertionError] will be thrown if [initialCameraPosition] is null;
const AMapWidget({ const AMapWidget({
Key? key, Key? key,
@Deprecated('高德开放平台的key请通过AMapInitializer初始化设置将在1.0.1+移除')
this.privacyStatement,
@Deprecated('高德开放平台的key请通过AMapInitializer初始化设置将在1.0.1+移除') this.apiKey,
this.initialCameraPosition = this.initialCameraPosition =
const CameraPosition(target: LatLng(39.909187, 116.397451), zoom: 10), const CameraPosition(target: LatLng(39.909187, 116.397451), zoom: 10),
this.mapType = MapType.normal, this.mapType = MapType.normal,
@ -157,9 +144,8 @@ class _MapState extends State<AMapWidget> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
final Map<String, dynamic> creationParams = <String, dynamic>{ final Map<String, dynamic> creationParams = <String, dynamic>{
'privacyStatement': 'privacyStatement': AMapInitializer._privacyStatement?.toMap(),
widget.privacyStatement?.toMap() ?? AMapInitializer._privacyStatement, 'apiKey': AMapInitializer._apiKey?.toMap(),
'apiKey': widget.apiKey?.toMap() ?? AMapInitializer._apiKey,
'initialCameraPosition': widget.initialCameraPosition.toMap(), 'initialCameraPosition': widget.initialCameraPosition.toMap(),
'options': _mapOptions.toMap(), 'options': _mapOptions.toMap(),
'markersToAdd': serializeOverlaySet(widget.markers), 'markersToAdd': serializeOverlaySet(widget.markers),

View File

@ -1,6 +1,6 @@
name: amap_map name: amap_map
description: Amap SDK Flutter plugin for integrating AMapSDK in iOS and Android applications. description: Amap SDK Flutter plugin for integrating AMapSDK in iOS and Android applications.
version: 1.0.0+8 version: 1.0.1
homepage: https://github.com/kuloud/amap_map homepage: https://github.com/kuloud/amap_map
issue_tracker: https://github.com/kuloud/amap_map/issues issue_tracker: https://github.com/kuloud/amap_map/issues
platforms: platforms: