Browse Source

Merge remote-tracking branch 'origin/master'

jun7572 4 years ago
parent
commit
e49c557c96

+ 18 - 0
.idea/codeStyles/Project.xml

@@ -1,5 +1,23 @@
 <component name="ProjectCodeStyleConfiguration">
 <component name="ProjectCodeStyleConfiguration">
   <code_scheme name="Project" version="173">
   <code_scheme name="Project" version="173">
+    <JetCodeStyleSettings>
+      <option name="PACKAGES_TO_USE_STAR_IMPORTS">
+        <value>
+          <package name="java.util" alias="false" withSubpackages="false" />
+          <package name="kotlinx.android.synthetic" alias="false" withSubpackages="true" />
+          <package name="io.ktor" alias="false" withSubpackages="true" />
+        </value>
+      </option>
+      <option name="PACKAGES_IMPORT_LAYOUT">
+        <value>
+          <package name="" alias="false" withSubpackages="true" />
+          <package name="java" alias="false" withSubpackages="true" />
+          <package name="javax" alias="false" withSubpackages="true" />
+          <package name="kotlin" alias="false" withSubpackages="true" />
+          <package name="" alias="true" withSubpackages="true" />
+        </value>
+      </option>
+    </JetCodeStyleSettings>
     <codeStyleSettings language="XML">
     <codeStyleSettings language="XML">
       <indentOptions>
       <indentOptions>
         <option name="CONTINUATION_INDENT_SIZE" value="4" />
         <option name="CONTINUATION_INDENT_SIZE" value="4" />

+ 83 - 34
.idea/workspace.xml

@@ -2,27 +2,11 @@
 <project version="4">
 <project version="4">
   <component name="ChangeListManager">
   <component name="ChangeListManager">
     <list default="true" id="cc871a7e-676b-4f6d-9e12-c09ccbaf84b8" name="Default Changelist" comment="">
     <list default="true" id="cc871a7e-676b-4f6d-9e12-c09ccbaf84b8" name="Default Changelist" comment="">
-      <change afterPath="$PROJECT_DIR$/ios/Assets/Images/dog.png" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/ios/Assets/Images/i2.png" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/ios/Classes/CustomAnnotation.h" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/ios/Classes/CustomAnnotation.m" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/ios/Classes/CustomCalloutView.h" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/ios/Classes/CustomCalloutView.m" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/ios/Classes/FlutterAmapView.h" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/ios/Classes/FlutterAmapView.m" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/.idea/codeStyles/Project.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/codeStyles/Project.xml" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/amap_location.iml" beforeDir="false" afterPath="$PROJECT_DIR$/amap_location.iml" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/example/ios/Runner.xcodeproj/project.pbxproj" beforeDir="false" afterPath="$PROJECT_DIR$/example/ios/Runner.xcodeproj/project.pbxproj" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/example/ios/Runner.xcodeproj/project.pbxproj" beforeDir="false" afterPath="$PROJECT_DIR$/example/ios/Runner.xcodeproj/project.pbxproj" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/example/ios/Runner/Info.plist" beforeDir="false" afterPath="$PROJECT_DIR$/example/ios/Runner/Info.plist" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/example/lib/map_util.dart" beforeDir="false" afterPath="$PROJECT_DIR$/example/lib/map_util.dart" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/example/lib/map_view_page.dart" beforeDir="false" afterPath="$PROJECT_DIR$/example/lib/map_view_page.dart" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/ios/Classes/AmapLocationPlugin.h" beforeDir="false" afterPath="$PROJECT_DIR$/ios/Classes/AmapLocationPlugin.h" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/ios/Classes/AmapLocationPlugin.m" beforeDir="false" afterPath="$PROJECT_DIR$/ios/Classes/AmapLocationPlugin.m" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/ios/amap_location.podspec" beforeDir="false" afterPath="$PROJECT_DIR$/ios/amap_location.podspec" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/lib/amap_location.dart" beforeDir="false" afterPath="$PROJECT_DIR$/lib/amap_location.dart" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/pubspec.lock" beforeDir="false" afterPath="$PROJECT_DIR$/pubspec.lock" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/example/pubspec.lock" beforeDir="false" afterPath="$PROJECT_DIR$/example/pubspec.lock" afterDir="false" />
     </list>
     </list>
-    <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
     <option name="SHOW_DIALOG" value="false" />
     <option name="SHOW_DIALOG" value="false" />
     <option name="HIGHLIGHT_CONFLICTS" value="true" />
     <option name="HIGHLIGHT_CONFLICTS" value="true" />
     <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
     <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
@@ -32,7 +16,6 @@
     <option name="testRunner" value="GRADLE" />
     <option name="testRunner" value="GRADLE" />
     <option name="delegatedBuild" value="true" />
     <option name="delegatedBuild" value="true" />
   </component>
   </component>
-  <component name="ExecutionTargetManager" SELECTED_TARGET="Pixel_API_29" />
   <component name="FileTemplateManagerImpl">
   <component name="FileTemplateManagerImpl">
     <option name="RECENT_TEMPLATES">
     <option name="RECENT_TEMPLATES">
       <list>
       <list>
@@ -42,9 +25,14 @@
   </component>
   </component>
   <component name="Git.Settings">
   <component name="Git.Settings">
     <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
     <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
+    <option name="UPDATE_TYPE" value="MERGE" />
   </component>
   </component>
   <component name="ProjectId" id="1ZhcnqKcqhWNCVvGpQtRupLz0mB" />
   <component name="ProjectId" id="1ZhcnqKcqhWNCVvGpQtRupLz0mB" />
   <component name="ProjectLevelVcsManager" settingsEditedManually="true" />
   <component name="ProjectLevelVcsManager" settingsEditedManually="true" />
+  <component name="ProjectViewState">
+    <option name="showExcludedFiles" value="true" />
+    <option name="showLibraryContents" value="true" />
+  </component>
   <component name="PropertiesComponent">
   <component name="PropertiesComponent">
     <property name="SHARE_PROJECT_CONFIGURATION_FILES" value="true" />
     <property name="SHARE_PROJECT_CONFIGURATION_FILES" value="true" />
     <property name="dart.analysis.tool.window.force.activate" value="false" />
     <property name="dart.analysis.tool.window.force.activate" value="false" />
@@ -56,23 +44,12 @@
   <component name="RecentsManager">
   <component name="RecentsManager">
     <key name="CopyFile.RECENT_KEYS">
     <key name="CopyFile.RECENT_KEYS">
       <recent name="$PROJECT_DIR$/ios/Assets/Images" />
       <recent name="$PROJECT_DIR$/ios/Assets/Images" />
+      <recent name="$PROJECT_DIR$/android/src/main/res/drawable" />
     </key>
     </key>
     <key name="MoveFile.RECENT_KEYS">
     <key name="MoveFile.RECENT_KEYS">
       <recent name="$PROJECT_DIR$/ios" />
       <recent name="$PROJECT_DIR$/ios" />
     </key>
     </key>
   </component>
   </component>
-  <component name="RunDashboard">
-    <option name="ruleStates">
-      <list>
-        <RuleState>
-          <option name="name" value="ConfigurationTypeDashboardGroupingRule" />
-        </RuleState>
-        <RuleState>
-          <option name="name" value="StatusDashboardGroupingRule" />
-        </RuleState>
-      </list>
-    </option>
-  </component>
   <component name="SvnConfiguration">
   <component name="SvnConfiguration">
     <configuration />
     <configuration />
   </component>
   </component>
@@ -119,7 +96,35 @@
       <option name="project" value="LOCAL" />
       <option name="project" value="LOCAL" />
       <updated>1585372093906</updated>
       <updated>1585372093906</updated>
     </task>
     </task>
-    <option name="localTasksCounter" value="6" />
+    <task id="LOCAL-00006" summary="添加IOS地图和导航">
+      <created>1587634817150</created>
+      <option name="number" value="00006" />
+      <option name="presentableId" value="LOCAL-00006" />
+      <option name="project" value="LOCAL" />
+      <updated>1587634817150</updated>
+    </task>
+    <task id="LOCAL-00007" summary="更改我的定位图片">
+      <created>1592991552003</created>
+      <option name="number" value="00007" />
+      <option name="presentableId" value="LOCAL-00007" />
+      <option name="project" value="LOCAL" />
+      <updated>1592991552003</updated>
+    </task>
+    <task id="LOCAL-00008" summary="更改我的定位图片">
+      <created>1592992013729</created>
+      <option name="number" value="00008" />
+      <option name="presentableId" value="LOCAL-00008" />
+      <option name="project" value="LOCAL" />
+      <updated>1592992013729</updated>
+    </task>
+    <task id="LOCAL-00009" summary="修复打包错误的问题">
+      <created>1597654542330</created>
+      <option name="number" value="00009" />
+      <option name="presentableId" value="LOCAL-00009" />
+      <option name="project" value="LOCAL" />
+      <updated>1597654542330</updated>
+    </task>
+    <option name="localTasksCounter" value="10" />
     <servers />
     <servers />
   </component>
   </component>
   <component name="Vcs.Log.History.Properties">
   <component name="Vcs.Log.History.Properties">
@@ -149,14 +154,58 @@
     <MESSAGE value="更改IOS依赖包问题" />
     <MESSAGE value="更改IOS依赖包问题" />
     <MESSAGE value="解决IOS定位问题" />
     <MESSAGE value="解决IOS定位问题" />
     <MESSAGE value="去除无用的输出" />
     <MESSAGE value="去除无用的输出" />
-    <option name="LAST_COMMIT_MESSAGE" value="去除无用的输出" />
+    <MESSAGE value="添加IOS地图和导航" />
+    <MESSAGE value="更改我的定位图片" />
+    <MESSAGE value="修复打包错误的问题" />
+    <option name="LAST_COMMIT_MESSAGE" value="修复打包错误的问题" />
+  </component>
+  <component name="WindowStateProjectService">
+    <state x="569" y="118" key="CommitChangelistDialog2" timestamp="1597654542131">
+      <screen x="0" y="23" width="1920" height="985" />
+    </state>
+    <state x="569" y="118" key="CommitChangelistDialog2/0.23.1920.985@0.23.1920.985" timestamp="1597654542131" />
+    <state x="569" y="118" key="CommitChangelistDialog2/0.23.1920.988@0.23.1920.988" timestamp="1592992013571" />
+    <state width="939" height="396" key="GridCell.Tab.0.bottom" timestamp="1600065510793">
+      <screen x="0" y="23" width="1920" height="985" />
+    </state>
+    <state width="939" height="396" key="GridCell.Tab.0.bottom/0.23.1920.985@0.23.1920.985" timestamp="1600065510793" />
+    <state width="939" height="398" key="GridCell.Tab.0.bottom/0.23.1920.988@0.23.1920.988" timestamp="1592991557080" />
+    <state width="939" height="396" key="GridCell.Tab.0.center" timestamp="1600065510792">
+      <screen x="0" y="23" width="1920" height="985" />
+    </state>
+    <state width="939" height="396" key="GridCell.Tab.0.center/0.23.1920.985@0.23.1920.985" timestamp="1600065510792" />
+    <state width="939" height="398" key="GridCell.Tab.0.center/0.23.1920.988@0.23.1920.988" timestamp="1592991557079" />
+    <state width="939" height="396" key="GridCell.Tab.0.left" timestamp="1600065510792">
+      <screen x="0" y="23" width="1920" height="985" />
+    </state>
+    <state width="939" height="396" key="GridCell.Tab.0.left/0.23.1920.985@0.23.1920.985" timestamp="1600065510792" />
+    <state width="939" height="398" key="GridCell.Tab.0.left/0.23.1920.988@0.23.1920.988" timestamp="1592991557078" />
+    <state width="939" height="396" key="GridCell.Tab.0.right" timestamp="1600065510792">
+      <screen x="0" y="23" width="1920" height="985" />
+    </state>
+    <state width="939" height="396" key="GridCell.Tab.0.right/0.23.1920.985@0.23.1920.985" timestamp="1600065510792" />
+    <state width="939" height="398" key="GridCell.Tab.0.right/0.23.1920.988@0.23.1920.988" timestamp="1592991557079" />
+    <state x="699" y="235" key="RollbackChangesDialog" timestamp="1592991084836">
+      <screen x="0" y="23" width="1920" height="988" />
+    </state>
+    <state x="699" y="235" key="RollbackChangesDialog/0.23.1920.988@0.23.1920.988" timestamp="1592991084836" />
+    <state x="560" y="256" key="Vcs.Push.Dialog.v2" timestamp="1597654543552">
+      <screen x="0" y="23" width="1920" height="985" />
+    </state>
+    <state x="560" y="256" key="Vcs.Push.Dialog.v2/0.23.1920.985@0.23.1920.985" timestamp="1597654543552" />
+    <state x="560" y="257" key="Vcs.Push.Dialog.v2/0.23.1920.988@0.23.1920.988" timestamp="1592992014935" />
+    <state x="740" y="440" key="com.intellij.openapi.vcs.update.UpdateOrStatusOptionsDialogupdate-v2" timestamp="1600050241237">
+      <screen x="0" y="23" width="1920" height="985" />
+    </state>
+    <state x="740" y="440" key="com.intellij.openapi.vcs.update.UpdateOrStatusOptionsDialogupdate-v2/0.23.1920.985@0.23.1920.985" timestamp="1600050241237" />
+    <state x="740" y="441" key="com.intellij.openapi.vcs.update.UpdateOrStatusOptionsDialogupdate-v2/0.23.1920.988@0.23.1920.988" timestamp="1592991503877" />
   </component>
   </component>
   <component name="XDebuggerManager">
   <component name="XDebuggerManager">
     <breakpoint-manager>
     <breakpoint-manager>
       <breakpoints>
       <breakpoints>
         <line-breakpoint enabled="true" type="Dart">
         <line-breakpoint enabled="true" type="Dart">
           <url>file://$PROJECT_DIR$/lib/amap_location.dart</url>
           <url>file://$PROJECT_DIR$/lib/amap_location.dart</url>
-          <line>45</line>
+          <line>46</line>
           <option name="timeStamp" value="5" />
           <option name="timeStamp" value="5" />
         </line-breakpoint>
         </line-breakpoint>
       </breakpoints>
       </breakpoints>

+ 1 - 1
android/gradle/wrapper/gradle-wrapper.properties

@@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
 distributionPath=wrapper/dists
 distributionPath=wrapper/dists
 zipStoreBase=GRADLE_USER_HOME
 zipStoreBase=GRADLE_USER_HOME
 zipStorePath=wrapper/dists
 zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-all.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-all.zip

+ 2 - 7
android/src/main/kotlin/com/i2edu/amap_location/AmapLocationPlugin.kt

@@ -1,18 +1,13 @@
 package com.i2edu.amap_location
 package com.i2edu.amap_location
 
 
-import androidx.annotation.NonNull;
 import io.flutter.embedding.engine.plugins.FlutterPlugin
 import io.flutter.embedding.engine.plugins.FlutterPlugin
-import io.flutter.plugin.common.MethodCall
-import io.flutter.plugin.common.MethodChannel
-import io.flutter.plugin.common.MethodChannel.MethodCallHandler
-import io.flutter.plugin.common.MethodChannel.Result
 import io.flutter.plugin.common.PluginRegistry.Registrar
 import io.flutter.plugin.common.PluginRegistry.Registrar
 
 
 /** AmapLocationPlugin */
 /** AmapLocationPlugin */
 public class AmapLocationPlugin: FlutterPlugin {
 public class AmapLocationPlugin: FlutterPlugin {
 
 
 
 
-  override fun onAttachedToEngine(@NonNull flutterPluginBinding: FlutterPlugin.FlutterPluginBinding) {
+  override fun onAttachedToEngine( flutterPluginBinding: FlutterPlugin.FlutterPluginBinding) {
     flutterState = FlutterState(
     flutterState = FlutterState(
             flutterPluginBinding.applicationContext,
             flutterPluginBinding.applicationContext,
             flutterPluginBinding.binaryMessenger,
             flutterPluginBinding.binaryMessenger,
@@ -42,7 +37,7 @@ public class AmapLocationPlugin: FlutterPlugin {
     }
     }
   }
   }
 
 
-  override fun onDetachedFromEngine(@NonNull binding: FlutterPlugin.FlutterPluginBinding) {
+  override fun onDetachedFromEngine( binding: FlutterPlugin.FlutterPluginBinding) {
     flutterState?.stopListening()
     flutterState?.stopListening()
   }
   }
 }
 }

+ 1 - 1
example/android/gradle/wrapper/gradle-wrapper.properties

@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
 distributionPath=wrapper/dists
 distributionPath=wrapper/dists
 zipStoreBase=GRADLE_USER_HOME
 zipStoreBase=GRADLE_USER_HOME
 zipStorePath=wrapper/dists
 zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-all.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-all.zip

+ 1 - 16
example/ios/Runner.xcodeproj/project.pbxproj

@@ -9,11 +9,7 @@
 /* Begin PBXBuildFile section */
 /* Begin PBXBuildFile section */
 		1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
 		1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
 		3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
 		3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
-		3B80C3941E831B6300D905FE /* App.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; };
-		3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
 		6AEB02DB029C1071BA8726F7 /* libPods-Runner.a in Frameworks */ = {isa = PBXBuildFile; fileRef = B0ED1C984BFFAD6D8A0113FE /* libPods-Runner.a */; };
 		6AEB02DB029C1071BA8726F7 /* libPods-Runner.a in Frameworks */ = {isa = PBXBuildFile; fileRef = B0ED1C984BFFAD6D8A0113FE /* libPods-Runner.a */; };
-		9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; };
-		9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
 		978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */; };
 		978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */; };
 		97C146F31CF9000F007C117D /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C146F21CF9000F007C117D /* main.m */; };
 		97C146F31CF9000F007C117D /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C146F21CF9000F007C117D /* main.m */; };
 		97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
 		97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
@@ -28,8 +24,6 @@
 			dstPath = "";
 			dstPath = "";
 			dstSubfolderSpec = 10;
 			dstSubfolderSpec = 10;
 			files = (
 			files = (
-				3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */,
-				9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */,
 			);
 			);
 			name = "Embed Frameworks";
 			name = "Embed Frameworks";
 			runOnlyForDeploymentPostprocessing = 0;
 			runOnlyForDeploymentPostprocessing = 0;
@@ -41,14 +35,12 @@
 		1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = "<group>"; };
 		1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = "<group>"; };
 		246DACBB5A8A7F7A0DA90C0F /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = "<group>"; };
 		246DACBB5A8A7F7A0DA90C0F /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = "<group>"; };
 		3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = "<group>"; };
 		3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = "<group>"; };
-		3B80C3931E831B6300D905FE /* App.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = App.framework; path = Flutter/App.framework; sourceTree = "<group>"; };
 		5F08EC02D0B81FBC9584E536 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = "<group>"; };
 		5F08EC02D0B81FBC9584E536 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = "<group>"; };
 		7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = "<group>"; };
 		7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = "<group>"; };
 		7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
 		7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
 		7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; };
 		7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; };
 		9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = "<group>"; };
 		9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = "<group>"; };
 		9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = "<group>"; };
 		9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = "<group>"; };
-		9740EEBA1CF902C7004384FC /* Flutter.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Flutter.framework; path = Flutter/Flutter.framework; sourceTree = "<group>"; };
 		97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; };
 		97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; };
 		97C146F21CF9000F007C117D /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
 		97C146F21CF9000F007C117D /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
 		97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
 		97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
@@ -64,8 +56,6 @@
 			isa = PBXFrameworksBuildPhase;
 			isa = PBXFrameworksBuildPhase;
 			buildActionMask = 2147483647;
 			buildActionMask = 2147483647;
 			files = (
 			files = (
-				9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */,
-				3B80C3941E831B6300D905FE /* App.framework in Frameworks */,
 				6AEB02DB029C1071BA8726F7 /* libPods-Runner.a in Frameworks */,
 				6AEB02DB029C1071BA8726F7 /* libPods-Runner.a in Frameworks */,
 			);
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 			runOnlyForDeploymentPostprocessing = 0;
@@ -94,9 +84,7 @@
 		9740EEB11CF90186004384FC /* Flutter */ = {
 		9740EEB11CF90186004384FC /* Flutter */ = {
 			isa = PBXGroup;
 			isa = PBXGroup;
 			children = (
 			children = (
-				3B80C3931E831B6300D905FE /* App.framework */,
 				3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */,
 				3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */,
-				9740EEBA1CF902C7004384FC /* Flutter.framework */,
 				9740EEB21CF90195004384FC /* Debug.xcconfig */,
 				9740EEB21CF90195004384FC /* Debug.xcconfig */,
 				7AFA3C8E1D35360C0083082E /* Release.xcconfig */,
 				7AFA3C8E1D35360C0083082E /* Release.xcconfig */,
 				9740EEB31CF90195004384FC /* Generated.xcconfig */,
 				9740EEB31CF90195004384FC /* Generated.xcconfig */,
@@ -233,7 +221,7 @@
 			);
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 			runOnlyForDeploymentPostprocessing = 0;
 			shellPath = /bin/sh;
 			shellPath = /bin/sh;
-			shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" thin";
+			shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin";
 		};
 		};
 		7D20052C58D814336066BB01 /* [CP] Copy Pods Resources */ = {
 		7D20052C58D814336066BB01 /* [CP] Copy Pods Resources */ = {
 			isa = PBXShellScriptBuildPhase;
 			isa = PBXShellScriptBuildPhase;
@@ -338,7 +326,6 @@
 /* Begin XCBuildConfiguration section */
 /* Begin XCBuildConfiguration section */
 		249021D3217E4FDB00AE95B9 /* Profile */ = {
 		249021D3217E4FDB00AE95B9 /* Profile */ = {
 			isa = XCBuildConfiguration;
 			isa = XCBuildConfiguration;
-			baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
 			buildSettings = {
 			buildSettings = {
 				ALWAYS_SEARCH_USER_PATHS = NO;
 				ALWAYS_SEARCH_USER_PATHS = NO;
 				CLANG_ANALYZER_NONNULL = YES;
 				CLANG_ANALYZER_NONNULL = YES;
@@ -413,7 +400,6 @@
 		};
 		};
 		97C147031CF9000F007C117D /* Debug */ = {
 		97C147031CF9000F007C117D /* Debug */ = {
 			isa = XCBuildConfiguration;
 			isa = XCBuildConfiguration;
-			baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
 			buildSettings = {
 			buildSettings = {
 				ALWAYS_SEARCH_USER_PATHS = NO;
 				ALWAYS_SEARCH_USER_PATHS = NO;
 				CLANG_ANALYZER_NONNULL = YES;
 				CLANG_ANALYZER_NONNULL = YES;
@@ -469,7 +455,6 @@
 		};
 		};
 		97C147041CF9000F007C117D /* Release */ = {
 		97C147041CF9000F007C117D /* Release */ = {
 			isa = XCBuildConfiguration;
 			isa = XCBuildConfiguration;
-			baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
 			buildSettings = {
 			buildSettings = {
 				ALWAYS_SEARCH_USER_PATHS = NO;
 				ALWAYS_SEARCH_USER_PATHS = NO;
 				CLANG_ANALYZER_NONNULL = YES;
 				CLANG_ANALYZER_NONNULL = YES;

+ 1 - 1
example/lib/main.dart

@@ -76,7 +76,7 @@ class HomePageState extends State<HomePage> {
                       locationMode: LocationMode.Battery_Saving,));
                       locationMode: LocationMode.Battery_Saving,));
                 AmapLocation.instance.locationStream.listen((d) {
                 AmapLocation.instance.locationStream.listen((d) {
                   print(d.city);
                   print(d.city);
-                  AmapLocation.instance.disposed();
+                  AmapLocation.instance.closeLocation();
                   // stop location when isOnceLocation is true
                   // stop location when isOnceLocation is true
 //                     AmapLocation.instance.disposed();
 //                     AmapLocation.instance.disposed();
                 });
                 });

+ 29 - 71
example/pubspec.lock

@@ -2,68 +2,54 @@
 # See https://dart.dev/tools/pub/glossary#lockfile
 # See https://dart.dev/tools/pub/glossary#lockfile
 packages:
 packages:
   amap_location:
   amap_location:
-    dependency: "direct dev"
+    dependency: "direct main"
     description:
     description:
       path: ".."
       path: ".."
       relative: true
       relative: true
     source: path
     source: path
     version: "0.0.1"
     version: "0.0.1"
-  archive:
-    dependency: transitive
-    description:
-      name: archive
-      url: "https://pub.flutter-io.cn"
-    source: hosted
-    version: "2.0.11"
-  args:
-    dependency: transitive
-    description:
-      name: args
-      url: "https://pub.flutter-io.cn"
-    source: hosted
-    version: "1.5.2"
   async:
   async:
     dependency: transitive
     dependency: transitive
     description:
     description:
       name: async
       name: async
       url: "https://pub.flutter-io.cn"
       url: "https://pub.flutter-io.cn"
     source: hosted
     source: hosted
-    version: "2.4.0"
+    version: "2.4.2"
   boolean_selector:
   boolean_selector:
     dependency: transitive
     dependency: transitive
     description:
     description:
       name: boolean_selector
       name: boolean_selector
       url: "https://pub.flutter-io.cn"
       url: "https://pub.flutter-io.cn"
     source: hosted
     source: hosted
-    version: "1.0.5"
-  charcode:
+    version: "2.0.0"
+  characters:
     dependency: transitive
     dependency: transitive
     description:
     description:
-      name: charcode
+      name: characters
       url: "https://pub.flutter-io.cn"
       url: "https://pub.flutter-io.cn"
     source: hosted
     source: hosted
-    version: "1.1.2"
-  collection:
+    version: "1.0.0"
+  charcode:
     dependency: transitive
     dependency: transitive
     description:
     description:
-      name: collection
+      name: charcode
       url: "https://pub.flutter-io.cn"
       url: "https://pub.flutter-io.cn"
     source: hosted
     source: hosted
-    version: "1.14.11"
-  convert:
+    version: "1.1.3"
+  clock:
     dependency: transitive
     dependency: transitive
     description:
     description:
-      name: convert
+      name: clock
       url: "https://pub.flutter-io.cn"
       url: "https://pub.flutter-io.cn"
     source: hosted
     source: hosted
-    version: "2.1.1"
-  crypto:
+    version: "1.0.1"
+  collection:
     dependency: transitive
     dependency: transitive
     description:
     description:
-      name: crypto
+      name: collection
       url: "https://pub.flutter-io.cn"
       url: "https://pub.flutter-io.cn"
     source: hosted
     source: hosted
-    version: "2.1.3"
+    version: "1.14.13"
   cupertino_icons:
   cupertino_icons:
     dependency: "direct main"
     dependency: "direct main"
     description:
     description:
@@ -71,6 +57,13 @@ packages:
       url: "https://pub.flutter-io.cn"
       url: "https://pub.flutter-io.cn"
     source: hosted
     source: hosted
     version: "0.1.3"
     version: "0.1.3"
+  fake_async:
+    dependency: transitive
+    description:
+      name: fake_async
+      url: "https://pub.flutter-io.cn"
+    source: hosted
+    version: "1.1.0"
   flutter:
   flutter:
     dependency: "direct main"
     dependency: "direct main"
     description: flutter
     description: flutter
@@ -86,20 +79,13 @@ packages:
     description: flutter
     description: flutter
     source: sdk
     source: sdk
     version: "0.0.0"
     version: "0.0.0"
-  image:
-    dependency: transitive
-    description:
-      name: image
-      url: "https://pub.flutter-io.cn"
-    source: hosted
-    version: "2.1.4"
   matcher:
   matcher:
     dependency: transitive
     dependency: transitive
     description:
     description:
       name: matcher
       name: matcher
       url: "https://pub.flutter-io.cn"
       url: "https://pub.flutter-io.cn"
     source: hosted
     source: hosted
-    version: "0.12.6"
+    version: "0.12.8"
   meta:
   meta:
     dependency: transitive
     dependency: transitive
     description:
     description:
@@ -113,21 +99,7 @@ packages:
       name: path
       name: path
       url: "https://pub.flutter-io.cn"
       url: "https://pub.flutter-io.cn"
     source: hosted
     source: hosted
-    version: "1.6.4"
-  pedantic:
-    dependency: transitive
-    description:
-      name: pedantic
-      url: "https://pub.flutter-io.cn"
-    source: hosted
-    version: "1.8.0+1"
-  petitparser:
-    dependency: transitive
-    description:
-      name: petitparser
-      url: "https://pub.flutter-io.cn"
-    source: hosted
-    version: "2.4.0"
+    version: "1.7.0"
   plugin_platform_interface:
   plugin_platform_interface:
     dependency: transitive
     dependency: transitive
     description:
     description:
@@ -135,13 +107,6 @@ packages:
       url: "https://pub.flutter-io.cn"
       url: "https://pub.flutter-io.cn"
     source: hosted
     source: hosted
     version: "1.0.2"
     version: "1.0.2"
-  quiver:
-    dependency: transitive
-    description:
-      name: quiver
-      url: "https://pub.flutter-io.cn"
-    source: hosted
-    version: "2.0.5"
   sky_engine:
   sky_engine:
     dependency: transitive
     dependency: transitive
     description: flutter
     description: flutter
@@ -153,14 +118,14 @@ packages:
       name: source_span
       name: source_span
       url: "https://pub.flutter-io.cn"
       url: "https://pub.flutter-io.cn"
     source: hosted
     source: hosted
-    version: "1.5.5"
+    version: "1.7.0"
   stack_trace:
   stack_trace:
     dependency: transitive
     dependency: transitive
     description:
     description:
       name: stack_trace
       name: stack_trace
       url: "https://pub.flutter-io.cn"
       url: "https://pub.flutter-io.cn"
     source: hosted
     source: hosted
-    version: "1.9.3"
+    version: "1.9.5"
   stream_channel:
   stream_channel:
     dependency: transitive
     dependency: transitive
     description:
     description:
@@ -188,14 +153,14 @@ packages:
       name: test_api
       name: test_api
       url: "https://pub.flutter-io.cn"
       url: "https://pub.flutter-io.cn"
     source: hosted
     source: hosted
-    version: "0.2.11"
+    version: "0.2.17"
   typed_data:
   typed_data:
     dependency: transitive
     dependency: transitive
     description:
     description:
       name: typed_data
       name: typed_data
       url: "https://pub.flutter-io.cn"
       url: "https://pub.flutter-io.cn"
     source: hosted
     source: hosted
-    version: "1.1.6"
+    version: "1.2.0"
   url_launcher:
   url_launcher:
     dependency: "direct dev"
     dependency: "direct dev"
     description:
     description:
@@ -231,13 +196,6 @@ packages:
       url: "https://pub.flutter-io.cn"
       url: "https://pub.flutter-io.cn"
     source: hosted
     source: hosted
     version: "2.0.8"
     version: "2.0.8"
-  xml:
-    dependency: transitive
-    description:
-      name: xml
-      url: "https://pub.flutter-io.cn"
-    source: hosted
-    version: "3.5.0"
 sdks:
 sdks:
-  dart: ">=2.4.0 <3.0.0"
+  dart: ">=2.9.0-14.0.dev <3.0.0"
   flutter: ">=1.12.8 <2.0.0"
   flutter: ">=1.12.8 <2.0.0"

+ 9 - 9
lib/amap_location.dart

@@ -31,22 +31,22 @@ class AmapLocation {
   }
   }
 
 
   Future<void> startLocation({LocationOption options}) async {
   Future<void> startLocation({LocationOption options}) async {
-    if (_locationStreamController == null) {
-      _locationStreamController =
-          StreamController<LocationResultEntity>.broadcast();
-    }
     return await _channel.invokeMethod(
     return await _channel.invokeMethod(
         'startLocation', options?.toMap() ?? LocationOption().toMap());
         'startLocation', options?.toMap() ?? LocationOption().toMap());
   }
   }
 
 
-  Future<void> disposed() async {
-    if (!_locationStreamController.isClosed) {
-      await _locationStreamController.close();
-      _locationStreamController=null;
-    }
+  Future<void> closeLocation() async {
     return await _channel.invokeMethod("closeLocation");
     return await _channel.invokeMethod("closeLocation");
   }
   }
 
 
+  // Future<void> disposed() async {
+  //   if (!_locationStreamController.isClosed) {
+  //     await _locationStreamController.close();
+  //     _locationStreamController=null;
+  //   }
+  //   return await _channel.invokeMethod("closeLocation");
+  // }
+
   Future<void> platformCallHandler(MethodCall call) async {
   Future<void> platformCallHandler(MethodCall call) async {
     try {
     try {
       if (call.method == "location") {
       if (call.method == "location") {