ソースを参照

修改安卓端返回评测结果方式

hwh97 6 年 前
コミット
ab49e7da4c

+ 20 - 21
.idea/libraries/Dart_SDK.xml

@@ -1,27 +1,26 @@
 <component name="libraryTable">
   <library name="Dart SDK">
     <CLASSES>
-      <root url="file://$PROJECT_DIR$/../flutter/bin/cache/dart-sdk/lib/async" />
-      <root url="file://$PROJECT_DIR$/../flutter/bin/cache/dart-sdk/lib/cli" />
-      <root url="file://$PROJECT_DIR$/../flutter/bin/cache/dart-sdk/lib/collection" />
-      <root url="file://$PROJECT_DIR$/../flutter/bin/cache/dart-sdk/lib/convert" />
-      <root url="file://$PROJECT_DIR$/../flutter/bin/cache/dart-sdk/lib/core" />
-      <root url="file://$PROJECT_DIR$/../flutter/bin/cache/dart-sdk/lib/developer" />
-      <root url="file://$PROJECT_DIR$/../flutter/bin/cache/dart-sdk/lib/ffi" />
-      <root url="file://$PROJECT_DIR$/../flutter/bin/cache/dart-sdk/lib/html" />
-      <root url="file://$PROJECT_DIR$/../flutter/bin/cache/dart-sdk/lib/indexed_db" />
-      <root url="file://$PROJECT_DIR$/../flutter/bin/cache/dart-sdk/lib/io" />
-      <root url="file://$PROJECT_DIR$/../flutter/bin/cache/dart-sdk/lib/isolate" />
-      <root url="file://$PROJECT_DIR$/../flutter/bin/cache/dart-sdk/lib/js" />
-      <root url="file://$PROJECT_DIR$/../flutter/bin/cache/dart-sdk/lib/js_util" />
-      <root url="file://$PROJECT_DIR$/../flutter/bin/cache/dart-sdk/lib/math" />
-      <root url="file://$PROJECT_DIR$/../flutter/bin/cache/dart-sdk/lib/mirrors" />
-      <root url="file://$PROJECT_DIR$/../flutter/bin/cache/dart-sdk/lib/svg" />
-      <root url="file://$PROJECT_DIR$/../flutter/bin/cache/dart-sdk/lib/typed_data" />
-      <root url="file://$PROJECT_DIR$/../flutter/bin/cache/dart-sdk/lib/wasm" />
-      <root url="file://$PROJECT_DIR$/../flutter/bin/cache/dart-sdk/lib/web_audio" />
-      <root url="file://$PROJECT_DIR$/../flutter/bin/cache/dart-sdk/lib/web_gl" />
-      <root url="file://$PROJECT_DIR$/../flutter/bin/cache/dart-sdk/lib/web_sql" />
+      <root url="file://C:/flutter/flutter/bin/cache/dart-sdk/lib/async" />
+      <root url="file://C:/flutter/flutter/bin/cache/dart-sdk/lib/cli" />
+      <root url="file://C:/flutter/flutter/bin/cache/dart-sdk/lib/collection" />
+      <root url="file://C:/flutter/flutter/bin/cache/dart-sdk/lib/convert" />
+      <root url="file://C:/flutter/flutter/bin/cache/dart-sdk/lib/core" />
+      <root url="file://C:/flutter/flutter/bin/cache/dart-sdk/lib/developer" />
+      <root url="file://C:/flutter/flutter/bin/cache/dart-sdk/lib/ffi" />
+      <root url="file://C:/flutter/flutter/bin/cache/dart-sdk/lib/html" />
+      <root url="file://C:/flutter/flutter/bin/cache/dart-sdk/lib/indexed_db" />
+      <root url="file://C:/flutter/flutter/bin/cache/dart-sdk/lib/io" />
+      <root url="file://C:/flutter/flutter/bin/cache/dart-sdk/lib/isolate" />
+      <root url="file://C:/flutter/flutter/bin/cache/dart-sdk/lib/js" />
+      <root url="file://C:/flutter/flutter/bin/cache/dart-sdk/lib/js_util" />
+      <root url="file://C:/flutter/flutter/bin/cache/dart-sdk/lib/math" />
+      <root url="file://C:/flutter/flutter/bin/cache/dart-sdk/lib/mirrors" />
+      <root url="file://C:/flutter/flutter/bin/cache/dart-sdk/lib/svg" />
+      <root url="file://C:/flutter/flutter/bin/cache/dart-sdk/lib/typed_data" />
+      <root url="file://C:/flutter/flutter/bin/cache/dart-sdk/lib/web_audio" />
+      <root url="file://C:/flutter/flutter/bin/cache/dart-sdk/lib/web_gl" />
+      <root url="file://C:/flutter/flutter/bin/cache/dart-sdk/lib/web_sql" />
     </CLASSES>
     <JAVADOC />
     <SOURCES />

+ 6 - 0
.idea/vcs.xml

@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="VcsDirectoryMappings">
+    <mapping directory="$PROJECT_DIR$" vcs="Git" />
+  </component>
+</project>

+ 57 - 63
.idea/workspace.xml

@@ -2,51 +2,11 @@
 <project version="4">
   <component name="ChangeListManager">
     <list default="true" id="91fb8cbe-3946-4eca-a4cf-05dab52b73c6" name="Default Changelist" comment="">
+      <change afterPath="$PROJECT_DIR$/.idea/vcs.xml" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/.idea/libraries/Dart_SDK.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/libraries/Dart_SDK.xml" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/.idea/libraries/Flutter_Plugins.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/libraries/Flutter_Plugins.xml" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/example/ios/Flutter/AppFrameworkInfo.plist" beforeDir="false" afterPath="$PROJECT_DIR$/example/ios/Flutter/AppFrameworkInfo.plist" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/example/ios/Flutter/Debug.xcconfig" beforeDir="false" afterPath="$PROJECT_DIR$/example/ios/Flutter/Debug.xcconfig" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/example/ios/Flutter/Release.xcconfig" beforeDir="false" afterPath="$PROJECT_DIR$/example/ios/Flutter/Release.xcconfig" 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.xcworkspace/contents.xcworkspacedata" beforeDir="false" afterPath="$PROJECT_DIR$/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme" beforeDir="false" afterPath="$PROJECT_DIR$/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/example/ios/Runner.xcworkspace/contents.xcworkspacedata" beforeDir="false" afterPath="$PROJECT_DIR$/example/ios/Runner.xcworkspace/contents.xcworkspacedata" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/example/ios/Runner/AppDelegate.swift" beforeDir="false" />
-      <change beforePath="$PROJECT_DIR$/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json" beforeDir="false" afterPath="$PROJECT_DIR$/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png" beforeDir="false" afterPath="$PROJECT_DIR$/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png" beforeDir="false" afterPath="$PROJECT_DIR$/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png" beforeDir="false" afterPath="$PROJECT_DIR$/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png" beforeDir="false" afterPath="$PROJECT_DIR$/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png" beforeDir="false" afterPath="$PROJECT_DIR$/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png" beforeDir="false" afterPath="$PROJECT_DIR$/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png" beforeDir="false" afterPath="$PROJECT_DIR$/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png" beforeDir="false" afterPath="$PROJECT_DIR$/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png" beforeDir="false" afterPath="$PROJECT_DIR$/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png" beforeDir="false" afterPath="$PROJECT_DIR$/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png" beforeDir="false" afterPath="$PROJECT_DIR$/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png" beforeDir="false" afterPath="$PROJECT_DIR$/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png" beforeDir="false" afterPath="$PROJECT_DIR$/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png" beforeDir="false" afterPath="$PROJECT_DIR$/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png" beforeDir="false" afterPath="$PROJECT_DIR$/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json" beforeDir="false" afterPath="$PROJECT_DIR$/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png" beforeDir="false" afterPath="$PROJECT_DIR$/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png" beforeDir="false" afterPath="$PROJECT_DIR$/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png" beforeDir="false" afterPath="$PROJECT_DIR$/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md" beforeDir="false" afterPath="$PROJECT_DIR$/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/example/ios/Runner/Base.lproj/LaunchScreen.storyboard" beforeDir="false" afterPath="$PROJECT_DIR$/example/ios/Runner/Base.lproj/LaunchScreen.storyboard" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/example/ios/Runner/Base.lproj/Main.storyboard" beforeDir="false" afterPath="$PROJECT_DIR$/example/ios/Runner/Base.lproj/Main.storyboard" 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/ios/Runner/Runner-Bridging-Header.h" beforeDir="false" />
-      <change beforePath="$PROJECT_DIR$/example/pubspec.lock" beforeDir="false" afterPath="$PROJECT_DIR$/example/pubspec.lock" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/ios/.gitignore" beforeDir="false" afterPath="$PROJECT_DIR$/ios/.gitignore" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/ios/Assets/.gitkeep" beforeDir="false" afterPath="$PROJECT_DIR$/ios/Assets/.gitkeep" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/ios/Classes/SpeechPlugin.h" beforeDir="false" afterPath="$PROJECT_DIR$/ios/Classes/SpeechPlugin.h" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/ios/Classes/SpeechPlugin.m" beforeDir="false" afterPath="$PROJECT_DIR$/ios/Classes/SpeechPlugin.m" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/ios/Classes/SwiftSpeechPlugin.swift" beforeDir="false" />
-      <change beforePath="$PROJECT_DIR$/ios/speech_plugin.podspec" beforeDir="false" afterPath="$PROJECT_DIR$/ios/speech_plugin.podspec" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/pubspec.lock" beforeDir="false" afterPath="$PROJECT_DIR$/pubspec.lock" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/speech_plugin.iml" beforeDir="false" afterPath="$PROJECT_DIR$/speech_plugin.iml" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/android/src/main/kotlin/cn/i2edu/speech_plugin/SpeechPlugin.kt" beforeDir="false" afterPath="$PROJECT_DIR$/android/src/main/kotlin/cn/i2edu/speech_plugin/SpeechPlugin.kt" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/lib/speech_plugin.dart" beforeDir="false" afterPath="$PROJECT_DIR$/lib/speech_plugin.dart" afterDir="false" />
     </list>
     <ignored path="$PROJECT_DIR$/.dart_tool/" />
     <ignored path="$PROJECT_DIR$/.idea/" />
@@ -60,14 +20,27 @@
     <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
     <option name="LAST_RESOLUTION" value="IGNORE" />
   </component>
-  <component name="ExecutionTargetManager" SELECTED_TARGET="Nexus_5X_API_29_x86" />
+  <component name="DefaultGradleProjectSettings">
+    <option name="testRunner" value="GRADLE" />
+    <option name="delegatedBuild" value="true" />
+  </component>
+  <component name="ExecutionTargetManager" SELECTED_TARGET="792QAESFTC6MD" />
   <component name="FileEditorManager">
     <leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
       <file pinned="false" current-in-tab="true">
         <entry file="file://$PROJECT_DIR$/lib/speech_plugin.dart">
           <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="405">
-              <caret line="29" column="2" selection-start-line="29" selection-start-column="2" selection-end-line="29" selection-end-column="2" />
+            <state relative-caret-position="187">
+              <caret line="45" column="19" selection-start-line="45" selection-start-column="7" selection-end-line="45" selection-end-column="19" />
+            </state>
+          </provider>
+        </entry>
+      </file>
+      <file pinned="false" current-in-tab="false">
+        <entry file="file://$PROJECT_DIR$/.gitignore">
+          <provider selected="true" editor-type-id="text-editor">
+            <state relative-caret-position="140">
+              <caret line="7" selection-start-line="7" selection-end-line="7" />
             </state>
           </provider>
         </entry>
@@ -85,40 +58,62 @@
     </option>
   </component>
   <component name="ProjectFrameBounds" extendedState="6">
-    <option name="x" value="293" />
-    <option name="y" value="159" />
-    <option name="width" value="1634" />
-    <option name="height" value="812" />
+    <option name="x" value="522" />
+    <option name="y" value="28" />
+    <option name="width" value="1346" />
+    <option name="height" value="955" />
   </component>
+  <component name="ProjectLevelVcsManager" settingsEditedManually="true" />
   <component name="ProjectView">
     <navigator currentView="ProjectPane" proportions="" version="1">
       <foldersAlwaysOnTop value="true" />
     </navigator>
     <panes>
+      <pane id="PackagesPane" />
+      <pane id="AndroidView" />
       <pane id="ProjectPane">
         <subPane>
           <expand>
             <path>
-              <item name="speech_lib" type="b2602c69:ProjectViewProjectNode" />
-              <item name="speech_lib" type="462c0819:PsiDirectoryNode" />
+              <item name="speech_plugin" type="b2602c69:ProjectViewProjectNode" />
+              <item name="speech_plugin" type="462c0819:PsiDirectoryNode" />
+            </path>
+            <path>
+              <item name="speech_plugin" type="b2602c69:ProjectViewProjectNode" />
+              <item name="speech_plugin" type="462c0819:PsiDirectoryNode" />
+              <item name="android" type="462c0819:PsiDirectoryNode" />
+            </path>
+            <path>
+              <item name="speech_plugin" type="b2602c69:ProjectViewProjectNode" />
+              <item name="speech_plugin" type="462c0819:PsiDirectoryNode" />
+              <item name="android" type="462c0819:PsiDirectoryNode" />
+              <item name="main" type="462c0819:PsiDirectoryNode" />
+            </path>
+            <path>
+              <item name="speech_plugin" type="b2602c69:ProjectViewProjectNode" />
+              <item name="speech_plugin" type="462c0819:PsiDirectoryNode" />
+              <item name="ios" type="462c0819:PsiDirectoryNode" />
             </path>
             <path>
-              <item name="speech_lib" type="b2602c69:ProjectViewProjectNode" />
-              <item name="speech_lib" type="462c0819:PsiDirectoryNode" />
+              <item name="speech_plugin" type="b2602c69:ProjectViewProjectNode" />
+              <item name="speech_plugin" type="462c0819:PsiDirectoryNode" />
               <item name="lib" type="462c0819:PsiDirectoryNode" />
             </path>
+            <path>
+              <item name="speech_plugin" type="b2602c69:ProjectViewProjectNode" />
+              <item name="External Libraries" type="cb654da1:ExternalLibrariesNode" />
+            </path>
           </expand>
           <select />
         </subPane>
       </pane>
       <pane id="Scope" />
-      <pane id="PackagesPane" />
     </panes>
   </component>
   <component name="PropertiesComponent">
     <property name="SHARE_PROJECT_CONFIGURATION_FILES" value="true" />
     <property name="dart.analysis.tool.window.force.activate" value="false" />
-    <property name="last_opened_file_path" value="$PROJECT_DIR$" />
+    <property name="last_opened_file_path" value="$PROJECT_DIR$/android" />
     <property name="settings.editor.selected.configurable" value="flutter.settings" />
     <property name="show.migrate.to.gradle.popup" value="false" />
   </component>
@@ -148,10 +143,9 @@
     <servers />
   </component>
   <component name="ToolWindowManager">
-    <frame x="0" y="23" width="1920" height="977" extended-state="6" />
-    <editor active="true" />
+    <frame x="-8" y="-8" width="1936" height="1056" extended-state="6" />
     <layout>
-      <window_info content_ui="combo" id="Project" order="0" visible="true" weight="0.20181043" />
+      <window_info active="true" content_ui="combo" id="Project" order="0" visible="true" weight="0.14658849" />
       <window_info id="Captures" order="1" side_tool="true" />
       <window_info id="Structure" order="2" side_tool="true" />
       <window_info id="Image Layers" order="3" />
@@ -160,9 +154,8 @@
       <window_info id="Resources Explorer" order="6" />
       <window_info id="Capture Tool" order="7" />
       <window_info id="Favorites" order="8" side_tool="true" />
-      <window_info anchor="bottom" id="Messages" weight="0.3299435" />
       <window_info anchor="bottom" id="Dart Analysis" order="0" weight="0.32936078" />
-      <window_info active="true" anchor="bottom" id="Run" order="1" visible="true" weight="0.3299435" />
+      <window_info anchor="bottom" id="Run" order="1" visible="true" weight="0.3299435" />
       <window_info anchor="bottom" id="TODO" order="2" />
       <window_info anchor="bottom" id="Android Profiler" order="3" show_stripe_button="false" />
       <window_info anchor="bottom" id="Logcat" order="4" />
@@ -171,6 +164,7 @@
       <window_info anchor="bottom" id="Event Log" order="7" side_tool="true" />
       <window_info anchor="bottom" id="Flutter Performance" order="8" side_tool="true" />
       <window_info anchor="bottom" id="Version Control" order="9" />
+      <window_info anchor="bottom" id="Messages" order="10" weight="0.3299435" />
       <window_info anchor="right" id="Device File Explorer" order="0" side_tool="true" />
       <window_info anchor="right" id="Capture Analysis" order="1" />
       <window_info anchor="right" id="Theme Preview" order="2" />
@@ -196,8 +190,8 @@
     </entry>
     <entry file="file://$PROJECT_DIR$/lib/speech_plugin.dart">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="405">
-          <caret line="29" column="2" selection-start-line="29" selection-start-column="2" selection-end-line="29" selection-end-column="2" />
+        <state relative-caret-position="187">
+          <caret line="45" column="19" selection-start-line="45" selection-start-column="7" selection-end-line="45" selection-end-column="19" />
         </state>
       </provider>
     </entry>

+ 10 - 10
android/src/main/kotlin/cn/i2edu/speech_plugin/SpeechPlugin.kt

@@ -32,10 +32,11 @@ class SpeechPlugin: MethodCallHandler {
   
   companion object {
     private lateinit var context: Context
+    private lateinit var channel: MethodChannel
     @JvmStatic
     fun registerWith(registrar: Registrar) {
       if (registrar.activity() == null) return
-      val channel = MethodChannel(registrar.messenger(), "speech_plugin")
+      channel = MethodChannel(registrar.messenger(), "speech_plugin")
       context = registrar.activeContext()
       channel.setMethodCallHandler(SpeechPlugin())
     }
@@ -54,7 +55,7 @@ class SpeechPlugin: MethodCallHandler {
       val recordPath = call.argument<String>("recordPath")!!
       val en = call.argument<String>("en")!!
 
-      evaluatorRecord(pathEvaluatorDecode, index, recordPath, en, false, result)
+      evaluatorRecord(pathEvaluatorDecode, index, recordPath, en, false)
     } else if (call.method == "evaluatorByMp4") {
       val pathEvaluatorDecode = call.argument<String>("pathEvaluatorDecode")!!
       val index = call.argument<Int>("index")!!
@@ -62,13 +63,13 @@ class SpeechPlugin: MethodCallHandler {
       val recordPath = call.argument<String>("recordPath")!!
       val en = call.argument<String>("en")!!
 
-      evaluatorVideoRecord(pathEvaluatorDecode, index, videoId, recordPath, en, result)
+      evaluatorVideoRecord(pathEvaluatorDecode, index, videoId, recordPath, en)
     } else {
       result.notImplemented()
     }
   }
 
-  private fun evaluatorVideoRecord(pathEvaluatorDecode: String, index: Int, videoId: String, recordPath: String, en: String, channelResult: Result) {
+  private fun evaluatorVideoRecord(pathEvaluatorDecode: String, index: Int, videoId: String, recordPath: String, en: String) {
     try {
       val movie = MovieCreator.build (recordPath)
       val audioTracks = arrayListOf<Track>()
@@ -88,7 +89,7 @@ class SpeechPlugin: MethodCallHandler {
         val fc = RandomAccessFile("$pathEvaluatorDecode/${videoId}_$index.aac", "rw").channel
         out.writeContainer(fc)
         fc.close()
-        evaluatorRecord(pathEvaluatorDecode, index, "$pathEvaluatorDecode/${videoId}_$index.aac", en, true, channelResult)
+        evaluatorRecord(pathEvaluatorDecode, index, "$pathEvaluatorDecode/${videoId}_$index.aac", en, true)
       } catch ( e: Exception) {
         e.printStackTrace()
       }
@@ -97,7 +98,7 @@ class SpeechPlugin: MethodCallHandler {
     }
   }
 
-  private fun evaluatorRecord(pathEvaluatorDecode: String, index: Int, recordPath: String, en: String, isVideo: Boolean, chanelResult: MethodChannel.Result) {
+  private fun evaluatorRecord(pathEvaluatorDecode: String, index: Int, recordPath: String, en: String, isVideo: Boolean) {
     val dir = File(pathEvaluatorDecode)
     if (!dir.exists()) dir.mkdirs()
     val decodePath = pathEvaluatorDecode + UUID.randomUUID().toString() + ".pcm"
@@ -130,11 +131,10 @@ class SpeechPlugin: MethodCallHandler {
                       }
                     }
 
-                    chanelResult.success(
-                            mapOf("index" to index,"score" to (if(parseResult.is_rejected) null else parseResult.total_score), "words" to JSON.toJSONString(formatWords)))
+                    channel.invokeMethod("evaluatorResult", mapOf("index" to index,"score" to (if(parseResult.is_rejected) null else parseResult.total_score), "words" to JSON.toJSONString(formatWords)))
                   } else {
 //                    Toast.makeText(context, "识别失败,结果为空", Toast.LENGTH_SHORT).show()
-                    chanelResult.success(mapOf("index" to index,"score" to null))
+                    channel.invokeMethod("evaluatorResult", mapOf("index" to index,"score" to null))
                   }
                 }
               }
@@ -143,7 +143,7 @@ class SpeechPlugin: MethodCallHandler {
                 (context as Activity).runOnUiThread {
                   //                  Toast.makeText(activity.applicationContext, "识别失败,错误描述:${error.errorDescription},错误码:${error.errorCode}",
 //                          Toast.LENGTH_SHORT).show()
-                  chanelResult.success(mapOf("index" to index,"score" to null))
+                  channel.invokeMethod("evaluatorResult", mapOf("index" to index,"score" to null))
                 }
               }
             })

+ 26 - 0
lib/speech_plugin.dart

@@ -8,6 +8,9 @@ class SpeechPlugin {
 
   static final SpeechPlugin _instance = SpeechPlugin();
 
+  StreamController _onEvaluatorChange;
+  Stream<Map> get evaluator => _onEvaluatorChange.stream;
+
   static SpeechPlugin get instance => _instance;
 
   static Future<String> get platformVersion async {
@@ -39,4 +42,27 @@ class SpeechPlugin {
    });
  }
 
+  /// 初始化listener 进入页面时调用
+  void initListener() {
+    _onEvaluatorChange = new StreamController<Map>.broadcast();
+    _channel.setMethodCallHandler(_onMethodCallHandler);
+  }
+
+  /// 原生返回数据回调方法
+  /// 录音进度
+  Future _onMethodCallHandler(MethodCall call) {
+    switch (call.method) {
+      case "evaluatorResult":
+        _onEvaluatorChange.add(call.arguments);
+        break;
+    }
+    return null;
+  }
+
+  /// 关闭stream
+  void closeStream() {
+    _channel.setMethodCallHandler(null);
+    _onEvaluatorChange.close();
+  }
+
 }