提交 a542ec9c authored 作者: 史晓晨's avatar 史晓晨

feat:修改警告

上级 abde6a33
import 'dart:typed_data';
import 'package:amap_flutter_map/amap_flutter_map.dart'; import 'package:amap_flutter_map/amap_flutter_map.dart';
import 'package:amap_flutter_map_example/base_page.dart'; import 'package:amap_flutter_map_example/base_page.dart';
import 'package:amap_flutter_map_example/const_config.dart'; import 'package:amap_flutter_map_example/const_config.dart';
......
import 'dart:typed_data';
import 'package:amap_flutter_base/amap_flutter_base.dart'; import 'package:amap_flutter_base/amap_flutter_base.dart';
import 'package:amap_flutter_map_example/base_page.dart'; import 'package:amap_flutter_map_example/base_page.dart';
import 'package:amap_flutter_map_example/const_config.dart'; import 'package:amap_flutter_map_example/const_config.dart';
......
...@@ -6,7 +6,6 @@ import 'package:amap_flutter_map_example/base_page.dart'; ...@@ -6,7 +6,6 @@ import 'package:amap_flutter_map_example/base_page.dart';
import 'package:amap_flutter_map_example/const_config.dart'; import 'package:amap_flutter_map_example/const_config.dart';
import 'package:amap_flutter_map_example/widgets/amap_switch_button.dart'; import 'package:amap_flutter_map_example/widgets/amap_switch_button.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';
import 'package:amap_flutter_map/amap_flutter_map.dart'; import 'package:amap_flutter_map/amap_flutter_map.dart';
import 'package:amap_flutter_base/amap_flutter_base.dart'; import 'package:amap_flutter_base/amap_flutter_base.dart';
......
import 'package:amap_flutter_map_example/base_page.dart'; import 'package:amap_flutter_map_example/base_page.dart';
import 'package:amap_flutter_map_example/widgets/amap_switch_button.dart'; import 'package:amap_flutter_map_example/widgets/amap_switch_button.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';
import 'package:amap_flutter_map/amap_flutter_map.dart'; import 'package:amap_flutter_map/amap_flutter_map.dart';
import 'package:amap_flutter_base/amap_flutter_base.dart'; import 'package:amap_flutter_base/amap_flutter_base.dart';
......
import 'package:amap_flutter_map_example/base_page.dart'; import 'package:amap_flutter_map_example/base_page.dart';
import 'package:amap_flutter_map_example/widgets/amap_switch_button.dart'; import 'package:amap_flutter_map_example/widgets/amap_switch_button.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';
import 'package:amap_flutter_map/amap_flutter_map.dart'; import 'package:amap_flutter_map/amap_flutter_map.dart';
import 'package:amap_flutter_base/amap_flutter_base.dart'; import 'package:amap_flutter_base/amap_flutter_base.dart';
......
import 'package:amap_flutter_map_example/base_page.dart'; import 'package:amap_flutter_map_example/base_page.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';
import 'package:amap_flutter_map/amap_flutter_map.dart'; import 'package:amap_flutter_map/amap_flutter_map.dart';
import 'package:amap_flutter_base/amap_flutter_base.dart'; import 'package:amap_flutter_base/amap_flutter_base.dart';
......
import 'package:amap_flutter_map/amap_flutter_map.dart'; import 'package:amap_flutter_map/amap_flutter_map.dart';
import 'package:amap_flutter_map_example/base_page.dart'; import 'package:amap_flutter_map_example/base_page.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';
import 'package:amap_flutter_base/amap_flutter_base.dart'; import 'package:amap_flutter_base/amap_flutter_base.dart';
class PolylineTextureDemoPage extends BasePage { class PolylineTextureDemoPage extends BasePage {
......
...@@ -60,7 +60,7 @@ class Toast { ...@@ -60,7 +60,7 @@ class Toast {
_pdHorizontal = pdHorizontal; _pdHorizontal = pdHorizontal;
_pdVertical = pdVertical; _pdVertical = pdVertical;
//获取OverlayState //获取OverlayState
OverlayState overlayState = Overlay.of(context)!; OverlayState overlayState = Overlay.of(context);
_showing = true; _showing = true;
if (_overlayEntry == null) { if (_overlayEntry == null) {
//OverlayEntry负责构建布局 //OverlayEntry负责构建布局
......
...@@ -2,12 +2,10 @@ ...@@ -2,12 +2,10 @@
library amap_flutter_map; library amap_flutter_map;
import 'dart:async'; import 'dart:async';
import 'dart:typed_data';
import 'package:amap_flutter_base/amap_flutter_base.dart'; import 'package:amap_flutter_base/amap_flutter_base.dart';
import 'package:amap_flutter_map/src/core/amap_flutter_platform.dart'; import 'package:amap_flutter_map/src/core/amap_flutter_platform.dart';
import 'package:amap_flutter_map/src/core/map_event.dart'; import 'package:amap_flutter_map/src/core/map_event.dart';
import 'package:amap_flutter_map/src/core/method_channel_amap_flutter_map.dart';
import 'package:amap_flutter_map/src/types/types.dart'; import 'package:amap_flutter_map/src/types/types.dart';
import 'package:flutter/foundation.dart'; import 'package:flutter/foundation.dart';
import 'package:flutter/gestures.dart'; import 'package:flutter/gestures.dart';
......
import 'dart:convert';
import 'dart:html'; import 'dart:html';
import 'dart:js_util'; import 'dart:js_util';
import 'dart:ui_web'; import 'dart:ui_web';
...@@ -11,7 +10,6 @@ import 'package:flutter/services.dart'; ...@@ -11,7 +10,6 @@ import 'package:flutter/services.dart';
import 'package:flutter_web_plugins/flutter_web_plugins.dart'; import 'package:flutter_web_plugins/flutter_web_plugins.dart';
import 'src/core/amap_flutter_platform.dart'; import 'src/core/amap_flutter_platform.dart';
import 'src/core/map_event.dart';
import 'src/web/amap.dart'; import 'src/web/amap.dart';
import 'src/web/amap_loader.dart'; import 'src/web/amap_loader.dart';
import 'src/web/utils.dart'; import 'src/web/utils.dart';
......
import 'package:amap_flutter_base/amap_flutter_base.dart'; import 'package:amap_flutter_base/amap_flutter_base.dart';
import 'package:amap_flutter_map/amap_flutter_map.dart'; import 'package:amap_flutter_map/amap_flutter_map.dart';
import 'package:amap_flutter_map/src/types/input_tips_result.dart';
import 'package:amap_flutter_map/src/types/regeocode_result.dart';
///地图事件处理 ///地图事件处理
class MapEvent<T> { class MapEvent<T> {
......
import 'package:amap_flutter_base/amap_flutter_base.dart'; import 'package:amap_flutter_base/amap_flutter_base.dart';
import 'package:flutter/cupertino.dart';
/// 相机位置,包含可视区域的位置参数。 /// 相机位置,包含可视区域的位置参数。
class CameraPosition { class CameraPosition {
...@@ -66,7 +65,7 @@ class CameraPosition { ...@@ -66,7 +65,7 @@ class CameraPosition {
} }
@override @override
int get hashCode => hashValues(bearing, target, tilt, zoom); int get hashCode => Object.hash(bearing, target, tilt, zoom);
@override @override
String toString() => String toString() =>
......
...@@ -2,11 +2,12 @@ ...@@ -2,11 +2,12 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
import 'dart:ui' show hashValues, Offset; import 'dart:ui' show Offset;
import 'package:amap_flutter_map/src/types/base_overlay.dart';
import 'package:amap_flutter_base/amap_flutter_base.dart'; import 'package:amap_flutter_base/amap_flutter_base.dart';
import 'package:amap_flutter_map/src/types/base_overlay.dart';
import 'bitmap.dart'; import 'bitmap.dart';
import 'base_overlay.dart';
/// Marker拖动回调 /// Marker拖动回调
typedef void MarkerDragEndCallback(String id, LatLng endPosition); typedef void MarkerDragEndCallback(String id, LatLng endPosition);
...@@ -68,7 +69,7 @@ class InfoWindow { ...@@ -68,7 +69,7 @@ class InfoWindow {
} }
@override @override
int get hashCode => hashValues(title, snippet); int get hashCode => Object.hash(title, snippet);
@override @override
String toString() { String toString() {
......
import 'dart:ui' show hashValues;
import 'package:flutter/foundation.dart' show setEquals; import 'package:flutter/foundation.dart' show setEquals;
import 'types.dart'; import 'types.dart';
import 'marker.dart';
/// 用以描述Marker的更新项 /// 用以描述Marker的更新项
class MarkerUpdates { class MarkerUpdates {
...@@ -82,7 +79,7 @@ class MarkerUpdates { ...@@ -82,7 +79,7 @@ class MarkerUpdates {
bool operator ==(Object other) { bool operator ==(Object other) {
if (identical(this, other)) return true; if (identical(this, other)) return true;
if (other.runtimeType != runtimeType) return false; if (other.runtimeType != runtimeType) return false;
if(other is !MarkerUpdates) return false; if (other is! MarkerUpdates) return false;
final MarkerUpdates typedOther = other; final MarkerUpdates typedOther = other;
return setEquals(markersToAdd, typedOther.markersToAdd) && return setEquals(markersToAdd, typedOther.markersToAdd) &&
setEquals(markerIdsToRemove, typedOther.markerIdsToRemove) && setEquals(markerIdsToRemove, typedOther.markerIdsToRemove) &&
...@@ -91,7 +88,7 @@ class MarkerUpdates { ...@@ -91,7 +88,7 @@ class MarkerUpdates {
@override @override
int get hashCode => int get hashCode =>
hashValues(markersToAdd, markerIdsToRemove, markersToChange); Object.hash(markersToAdd, markerIdsToRemove, markersToChange);
@override @override
String toString() { String toString() {
......
...@@ -2,8 +2,6 @@ ...@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
import 'dart:ui' show hashValues;
import 'package:flutter/foundation.dart' show setEquals; import 'package:flutter/foundation.dart' show setEquals;
import 'types.dart'; import 'types.dart';
...@@ -94,7 +92,7 @@ class PolygonUpdates { ...@@ -94,7 +92,7 @@ class PolygonUpdates {
@override @override
int get hashCode => int get hashCode =>
hashValues(polygonsToAdd, polygonIdsToRemove, polygonsToChange); Object.hash(polygonsToAdd, polygonIdsToRemove, polygonsToChange);
@override @override
String toString() { String toString() {
......
...@@ -2,11 +2,8 @@ ...@@ -2,11 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
import 'dart:ui' show hashValues;
import 'package:flutter/foundation.dart' show setEquals; import 'package:flutter/foundation.dart' show setEquals;
import 'polyline.dart';
import 'types.dart'; import 'types.dart';
/// 该类主要用以描述[Polyline]的增删改等更新操作 /// 该类主要用以描述[Polyline]的增删改等更新操作
...@@ -87,7 +84,7 @@ class PolylineUpdates { ...@@ -87,7 +84,7 @@ class PolylineUpdates {
bool operator ==(Object other) { bool operator ==(Object other) {
if (identical(this, other)) return true; if (identical(this, other)) return true;
if (other.runtimeType != runtimeType) return false; if (other.runtimeType != runtimeType) return false;
if (other is !PolylineUpdates) return false; if (other is! PolylineUpdates) return false;
final PolylineUpdates typedOther = other; final PolylineUpdates typedOther = other;
return setEquals(polylinesToAdd, typedOther.polylinesToAdd) && return setEquals(polylinesToAdd, typedOther.polylinesToAdd) &&
setEquals(polylineIdsToRemove, typedOther.polylineIdsToRemove) && setEquals(polylineIdsToRemove, typedOther.polylineIdsToRemove) &&
...@@ -96,7 +93,7 @@ class PolylineUpdates { ...@@ -96,7 +93,7 @@ class PolylineUpdates {
@override @override
int get hashCode => int get hashCode =>
hashValues(polylinesToAdd, polylineIdsToRemove, polylinesToChange); Object.hash(polylinesToAdd, polylineIdsToRemove, polylinesToChange);
@override @override
String toString() { String toString() {
......
...@@ -7,7 +7,6 @@ export 'polyline.dart'; ...@@ -7,7 +7,6 @@ export 'polyline.dart';
export 'polyline_updates.dart'; export 'polyline_updates.dart';
export 'polygon.dart'; export 'polygon.dart';
export 'polygon_updates.dart'; export 'polygon_updates.dart';
export 'camera.dart';
export 'bitmap.dart'; export 'bitmap.dart';
export 'poi_item.dart'; export 'poi_item.dart';
export 'poi_result.dart'; export 'poi_result.dart';
......
import 'dart:typed_data'; import 'dart:typed_data';
import 'dart:ui' show Color, hashValues; import 'dart:ui' show Color;
import 'package:amap_flutter_base/amap_flutter_base.dart'; import 'package:amap_flutter_base/amap_flutter_base.dart';
import 'package:amap_flutter_map/amap_flutter_map.dart'; import 'package:amap_flutter_map/amap_flutter_map.dart';
...@@ -63,8 +63,14 @@ class MinMaxZoomPreference { ...@@ -63,8 +63,14 @@ class MinMaxZoomPreference {
/// 缩放级别范围为[3, 20],超出范围取边界值 /// 缩放级别范围为[3, 20],超出范围取边界值
/// ///
const MinMaxZoomPreference(double minZoom, double maxZoom) const MinMaxZoomPreference(double minZoom, double maxZoom)
: this.minZoom = ((minZoom < 3 ? 3 : minZoom) > (maxZoom > 20 ? 20 : maxZoom) ? maxZoom : minZoom), : this.minZoom =
this.maxZoom = ((minZoom < 3 ? 3 : minZoom) > (maxZoom > 20 ? 20 : maxZoom) ? minZoom : maxZoom); ((minZoom < 3 ? 3 : minZoom) > (maxZoom > 20 ? 20 : maxZoom)
? maxZoom
: minZoom),
this.maxZoom =
((minZoom < 3 ? 3 : minZoom) > (maxZoom > 20 ? 20 : maxZoom)
? minZoom
: maxZoom);
/// 最小zoomLevel /// 最小zoomLevel
final double? minZoom; final double? minZoom;
...@@ -88,7 +94,7 @@ class MinMaxZoomPreference { ...@@ -88,7 +94,7 @@ class MinMaxZoomPreference {
} }
@override @override
int get hashCode => hashValues(minZoom, maxZoom); int get hashCode => Object.hash(minZoom, maxZoom);
@override @override
String toString() { String toString() {
...@@ -165,7 +171,7 @@ class MyLocationStyleOptions { ...@@ -165,7 +171,7 @@ class MyLocationStyleOptions {
bool operator ==(Object other) { bool operator ==(Object other) {
if (identical(this, other)) return true; if (identical(this, other)) return true;
if (runtimeType != other.runtimeType) return false; if (runtimeType != other.runtimeType) return false;
if (other is !MyLocationStyleOptions) return false; if (other is! MyLocationStyleOptions) return false;
final MyLocationStyleOptions typedOther = other; final MyLocationStyleOptions typedOther = other;
return enabled == typedOther.enabled && return enabled == typedOther.enabled &&
circleFillColor == typedOther.circleFillColor && circleFillColor == typedOther.circleFillColor &&
...@@ -184,7 +190,7 @@ class MyLocationStyleOptions { ...@@ -184,7 +190,7 @@ class MyLocationStyleOptions {
@override @override
int get hashCode => int get hashCode =>
hashValues(enabled, circleFillColor, circleStrokeColor, icon); Object.hash(enabled, circleFillColor, circleStrokeColor, icon);
} }
///地图自定义样式 ///地图自定义样式
...@@ -233,7 +239,7 @@ class CustomStyleOptions { ...@@ -233,7 +239,7 @@ class CustomStyleOptions {
bool operator ==(Object other) { bool operator ==(Object other) {
if (identical(this, other)) return true; if (identical(this, other)) return true;
if (runtimeType != other.runtimeType) return false; if (runtimeType != other.runtimeType) return false;
if (other is !CustomStyleOptions) return false; if (other is! CustomStyleOptions) return false;
final CustomStyleOptions typedOther = other; final CustomStyleOptions typedOther = other;
return enabled == typedOther.enabled && return enabled == typedOther.enabled &&
styleData == typedOther.styleData && styleData == typedOther.styleData &&
...@@ -241,7 +247,7 @@ class CustomStyleOptions { ...@@ -241,7 +247,7 @@ class CustomStyleOptions {
} }
@override @override
int get hashCode => hashValues(enabled, styleData, styleExtraData); int get hashCode => Object.hash(enabled, styleData, styleExtraData);
CustomStyleOptions clone() { CustomStyleOptions clone() {
return CustomStyleOptions(enabled, return CustomStyleOptions(enabled,
......
...@@ -4,7 +4,7 @@ version: 3.0.0 ...@@ -4,7 +4,7 @@ version: 3.0.0
homepage: https://lbs.amap.com/ homepage: https://lbs.amap.com/
environment: environment:
sdk: ">=2.12.0 <3.0.0" sdk: ">=2.14.0 <3.0.0"
flutter: ">=1.20.0" flutter: ">=1.20.0"
dependencies: dependencies:
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论