Commit 3636de24 authored by 林生雨's avatar 林生雨

commit

parent 703b4906
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<project version="4"> <project version="4">
<component name="AndroidLogFilters"> <component name="AndroidLogFilters">
<option name="TOOL_WINDOW_LOG_LEVEL" value="verbose" /> <option name="TOOL_WINDOW_LOG_LEVEL" value="error" />
<option name="TOOL_WINDOW_CONFIGURED_FILTER" value="Show only selected application" /> <option name="TOOL_WINDOW_CONFIGURED_FILTER" value="Show only selected application" />
</component> </component>
<component name="ChangeListManager"> <component name="ChangeListManager">
<list default="true" id="5be6bbb5-7d6e-4540-a24f-d2b3bf78b3ba" name="Default Changelist" comment=""> <list default="true" id="5be6bbb5-7d6e-4540-a24f-d2b3bf78b3ba" name="Default Changelist" comment="">
<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$/android/.idea/caches/build_file_checksums.ser" beforeDir="false" afterPath="$PROJECT_DIR$/android/.idea/caches/build_file_checksums.ser" afterDir="false" />
<change beforePath="$PROJECT_DIR$/android/src/main/java/com/example/gengmei_flutter_plugin/ImagePlugin/repository/ImageRespository.kt" beforeDir="false" afterPath="$PROJECT_DIR$/android/src/main/java/com/example/gengmei_flutter_plugin/ImagePlugin/repository/ImageRespository.kt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/android/src/main/java/com/example/gengmei_flutter_plugin/ImagePlugin/repository/bean/MediaFile.kt" beforeDir="false" afterPath="$PROJECT_DIR$/android/src/main/java/com/example/gengmei_flutter_plugin/ImagePlugin/repository/bean/MediaFile.kt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/android/src/main/java/com/example/gengmei_flutter_plugin/ImagePlugin/repository/local/ImageScanner.kt" beforeDir="false" afterPath="$PROJECT_DIR$/android/src/main/java/com/example/gengmei_flutter_plugin/ImagePlugin/repository/local/ImageScanner.kt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/android/src/main/java/com/example/gengmei_flutter_plugin/ImagePlugin/repository/local/VideoScanner.kt" beforeDir="false" afterPath="$PROJECT_DIR$/android/src/main/java/com/example/gengmei_flutter_plugin/ImagePlugin/repository/local/VideoScanner.kt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/android/src/main/java/com/example/gengmei_flutter_plugin/utils/MyUtil.kt" beforeDir="false" afterPath="$PROJECT_DIR$/android/src/main/java/com/example/gengmei_flutter_plugin/utils/MyUtil.kt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/example/ios/.symlinks/plugins/gengmei_flutter_plugin/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/example/ios/.symlinks/plugins/gengmei_flutter_plugin/.idea/workspace.xml" afterDir="false" /> <change beforePath="$PROJECT_DIR$/example/ios/.symlinks/plugins/gengmei_flutter_plugin/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/example/ios/.symlinks/plugins/gengmei_flutter_plugin/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/example/ios/.symlinks/plugins/gengmei_flutter_plugin/android/.idea/caches/build_file_checksums.ser" beforeDir="false" afterPath="$PROJECT_DIR$/example/ios/.symlinks/plugins/gengmei_flutter_plugin/android/.idea/caches/build_file_checksums.ser" afterDir="false" />
<change beforePath="$PROJECT_DIR$/example/ios/.symlinks/plugins/gengmei_flutter_plugin/android/src/main/java/com/example/gengmei_flutter_plugin/ImagePlugin/repository/ImageRespository.kt" beforeDir="false" afterPath="$PROJECT_DIR$/example/ios/.symlinks/plugins/gengmei_flutter_plugin/android/src/main/java/com/example/gengmei_flutter_plugin/ImagePlugin/repository/ImageRespository.kt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/example/ios/.symlinks/plugins/gengmei_flutter_plugin/example/pubspec.lock" beforeDir="false" afterPath="$PROJECT_DIR$/example/ios/.symlinks/plugins/gengmei_flutter_plugin/example/pubspec.lock" afterDir="false" />
<change beforePath="$PROJECT_DIR$/example/ios/.symlinks/plugins/gengmei_flutter_plugin/ios/Classes/GengmeiFlutterPlugin.m" beforeDir="false" afterPath="$PROJECT_DIR$/example/ios/.symlinks/plugins/gengmei_flutter_plugin/ios/Classes/GengmeiFlutterPlugin.m" afterDir="false" />
<change beforePath="$PROJECT_DIR$/example/pubspec.lock" beforeDir="false" afterPath="$PROJECT_DIR$/example/pubspec.lock" afterDir="false" />
<change beforePath="$PROJECT_DIR$/gengmei_flutter_plugin.iml" beforeDir="false" afterPath="$PROJECT_DIR$/gengmei_flutter_plugin.iml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/ios/Classes/GengmeiFlutterPlugin.m" beforeDir="false" afterPath="$PROJECT_DIR$/ios/Classes/GengmeiFlutterPlugin.m" afterDir="false" />
</list> </list>
<ignored path="$PROJECT_DIR$/.dart_tool/" /> <ignored path="$PROJECT_DIR$/.dart_tool/" />
<ignored path="$PROJECT_DIR$/.idea/" /> <ignored path="$PROJECT_DIR$/.idea/" />
...@@ -28,15 +41,19 @@ ...@@ -28,15 +41,19 @@
<component name="FileEditorManager"> <component name="FileEditorManager">
<leaf SIDE_TABS_SIZE_LIMIT_KEY="300"> <leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
<file pinned="false" current-in-tab="false"> <file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/example/lib/AlbumModel/page/temp.dart"> <entry file="file://$PROJECT_DIR$/lib/ScanImagePlugn.dart">
<provider selected="true" editor-type-id="text-editor" /> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="135">
<caret line="26" column="36" selection-start-line="26" selection-start-column="24" selection-end-line="26" selection-end-column="36" />
</state>
</provider>
</entry> </entry>
</file> </file>
<file pinned="false" current-in-tab="false"> <file pinned="false" current-in-tab="false">
<entry file="file://$USER_HOME$/Downloads/flutter/packages/flutter/lib/src/material/icons.dart"> <entry file="file://$PROJECT_DIR$/ios/Classes/GengmeiFlutterPlugin.h">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="45144"> <state relative-caret-position="88">
<caret line="2054" column="24" selection-start-line="2054" selection-start-column="24" selection-end-line="2054" selection-end-column="24" /> <caret line="4" selection-start-line="4" selection-end-line="4" />
</state> </state>
</provider> </provider>
</entry> </entry>
...@@ -44,8 +61,8 @@ ...@@ -44,8 +61,8 @@
<file pinned="false" current-in-tab="false"> <file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/example/lib/AlbumModel/page/album/AlbumModel.dart"> <entry file="file://$PROJECT_DIR$/example/lib/AlbumModel/page/album/AlbumModel.dart">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="1298"> <state relative-caret-position="111">
<caret line="70" column="20" selection-start-line="70" selection-start-column="12" selection-end-line="70" selection-end-column="20" /> <caret line="74" column="7" selection-start-line="59" selection-start-column="4" selection-end-line="74" selection-end-column="7" />
<folding> <folding>
<element signature="e#46#66#0" expanded="true" /> <element signature="e#46#66#0" expanded="true" />
</folding> </folding>
...@@ -54,74 +71,51 @@ ...@@ -54,74 +71,51 @@
</entry> </entry>
</file> </file>
<file pinned="false" current-in-tab="false"> <file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/example/lib/AlbumModel/repository/AlbumRepository.dart"> <entry file="file://$PROJECT_DIR$/android/src/main/java/com/example/gengmei_flutter_plugin/GengmeiFlutterPlugin.kt">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="396"> <state relative-caret-position="1392">
<caret line="23" column="47" selection-start-line="23" selection-start-column="47" selection-end-line="23" selection-end-column="47" /> <caret line="267" column="13" selection-start-line="267" selection-start-column="13" selection-end-line="267" selection-end-column="13" />
<folding>
<element signature="e#46#106#0" expanded="true" />
</folding>
</state> </state>
</provider> </provider>
</entry> </entry>
</file> </file>
<file pinned="false" current-in-tab="true"> <file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/lib/ScanImagePlugn.dart"> <entry file="file://$PROJECT_DIR$/pubspec.lock">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor" />
<state relative-caret-position="135">
<caret line="26" column="36" selection-start-line="26" selection-start-column="24" selection-end-line="26" selection-end-column="36" />
</state>
</provider>
</entry> </entry>
</file> </file>
<file pinned="false" current-in-tab="false"> <file pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/lib/gengmei_flutter_plugin.dart"> <entry file="file://$PROJECT_DIR$/pubspec.yaml">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="1430"> <state relative-caret-position="44">
<caret line="71" column="32" selection-start-line="71" selection-start-column="32" selection-end-line="71" selection-end-column="32" /> <caret line="2" column="9" selection-start-line="2" selection-start-column="9" selection-end-line="2" selection-end-column="16" />
<folding>
<element signature="e#0#20#0" expanded="true" />
</folding>
</state> </state>
</provider> </provider>
</entry> </entry>
</file> </file>
<file pinned="false" current-in-tab="false"> <file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/lib/SharedPlugin.dart"> <entry file="file://$PROJECT_DIR$/ios/Classes/GengmeiFlutterPlugin.m">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="330"> <state relative-caret-position="183">
<caret line="18" column="39" selection-start-line="18" selection-start-column="28" selection-end-line="18" selection-end-column="39" /> <caret line="387" column="22" selection-start-line="387" selection-start-column="12" selection-end-line="387" selection-end-column="22" />
</state> </state>
</provider> </provider>
</entry> </entry>
</file> </file>
<file pinned="false" current-in-tab="false"> <file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/example/lib/main.dart"> <entry file="file://$PROJECT_DIR$/ios/Classes/Image/AlbumItem.h">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor" />
<state relative-caret-position="682">
<caret line="31" column="9" selection-start-line="29" selection-start-column="5" selection-end-line="31" selection-end-column="9" />
<folding>
<element signature="e#0#17#0" expanded="true" />
</folding>
</state>
</provider>
</entry> </entry>
</file> </file>
<file pinned="false" current-in-tab="false"> <file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/.gitignore"> <entry file="file://$PROJECT_DIR$/ios/Classes/Image/ResultManager.h">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor" />
<state relative-caret-position="154">
<caret line="7" selection-start-line="7" selection-end-line="7" />
</state>
</provider>
</entry> </entry>
</file> </file>
<file pinned="false" current-in-tab="false"> <file pinned="false" current-in-tab="false">
<entry file="file://$USER_HOME$/Downloads/flutter/packages/flutter/lib/src/services/platform_channel.dart"> <entry file="file://$PROJECT_DIR$/ios/Classes/Image/ResultManager.m">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="6534"> <state relative-caret-position="-138" />
<caret line="306" column="12" selection-start-line="306" selection-start-column="12" selection-end-line="306" selection-end-column="12" />
</state>
</provider> </provider>
</entry> </entry>
</file> </file>
...@@ -150,6 +144,8 @@ ...@@ -150,6 +144,8 @@
<find>Icons</find> <find>Icons</find>
<find>dispo</find> <find>dispo</find>
<find>phoneImages</find> <find>phoneImages</find>
<find>_eventSink</find>
<find>isAdd</find>
</findStrings> </findStrings>
</component> </component>
<component name="Git.Settings"> <component name="Git.Settings">
...@@ -182,10 +178,10 @@ ...@@ -182,10 +178,10 @@
</option> </option>
</component> </component>
<component name="ProjectFrameBounds"> <component name="ProjectFrameBounds">
<option name="x" value="439" /> <option name="x" value="504" />
<option name="y" value="-1020" /> <option name="y" value="-895" />
<option name="width" value="1440" /> <option name="width" value="1440" />
<option name="height" value="811" /> <option name="height" value="812" />
</component> </component>
<component name="ProjectLevelVcsManager" settingsEditedManually="true" /> <component name="ProjectLevelVcsManager" settingsEditedManually="true" />
<component name="ProjectView"> <component name="ProjectView">
...@@ -193,6 +189,8 @@ ...@@ -193,6 +189,8 @@
<foldersAlwaysOnTop value="true" /> <foldersAlwaysOnTop value="true" />
</navigator> </navigator>
<panes> <panes>
<pane id="Scope" />
<pane id="PackagesPane" />
<pane id="AndroidView" /> <pane id="AndroidView" />
<pane id="ProjectPane"> <pane id="ProjectPane">
<subPane> <subPane>
...@@ -201,6 +199,24 @@ ...@@ -201,6 +199,24 @@
<item name="gengmei_flutter_plugin" type="b2602c69:ProjectViewProjectNode" /> <item name="gengmei_flutter_plugin" type="b2602c69:ProjectViewProjectNode" />
<item name="gengmei_flutter_plugin" type="462c0819:PsiDirectoryNode" /> <item name="gengmei_flutter_plugin" type="462c0819:PsiDirectoryNode" />
</path> </path>
<path>
<item name="gengmei_flutter_plugin" type="b2602c69:ProjectViewProjectNode" />
<item name="gengmei_flutter_plugin" type="462c0819:PsiDirectoryNode" />
<item name="android" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="gengmei_flutter_plugin" type="b2602c69:ProjectViewProjectNode" />
<item name="gengmei_flutter_plugin" type="462c0819:PsiDirectoryNode" />
<item name="android" type="462c0819:PsiDirectoryNode" />
<item name="main" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="gengmei_flutter_plugin" type="b2602c69:ProjectViewProjectNode" />
<item name="gengmei_flutter_plugin" type="462c0819:PsiDirectoryNode" />
<item name="android" type="462c0819:PsiDirectoryNode" />
<item name="main" type="462c0819:PsiDirectoryNode" />
<item name="gengmei_flutter_plugin" type="462c0819:PsiDirectoryNode" />
</path>
<path> <path>
<item name="gengmei_flutter_plugin" type="b2602c69:ProjectViewProjectNode" /> <item name="gengmei_flutter_plugin" type="b2602c69:ProjectViewProjectNode" />
<item name="gengmei_flutter_plugin" type="462c0819:PsiDirectoryNode" /> <item name="gengmei_flutter_plugin" type="462c0819:PsiDirectoryNode" />
...@@ -210,8 +226,6 @@ ...@@ -210,8 +226,6 @@
<select /> <select />
</subPane> </subPane>
</pane> </pane>
<pane id="PackagesPane" />
<pane id="Scope" />
</panes> </panes>
</component> </component>
<component name="PropertiesComponent"> <component name="PropertiesComponent">
...@@ -257,7 +271,8 @@ ...@@ -257,7 +271,8 @@
<servers /> <servers />
</component> </component>
<component name="ToolWindowManager"> <component name="ToolWindowManager">
<frame x="439" y="-1020" width="1440" height="811" extended-state="0" /> <frame x="297" y="-941" width="1440" height="812" extended-state="0" />
<editor active="true" />
<layout> <layout>
<window_info content_ui="combo" id="Project" order="0" visible="true" weight="0.1695279" /> <window_info content_ui="combo" id="Project" order="0" visible="true" weight="0.1695279" />
<window_info id="Captures" order="1" side_tool="true" /> <window_info id="Captures" order="1" side_tool="true" />
...@@ -272,13 +287,13 @@ ...@@ -272,13 +287,13 @@
<window_info anchor="bottom" id="Run" order="1" weight="0.4625" /> <window_info anchor="bottom" id="Run" order="1" weight="0.4625" />
<window_info anchor="bottom" id="TODO" order="2" /> <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="Android Profiler" order="3" show_stripe_button="false" />
<window_info anchor="bottom" id="Logcat" order="4" weight="0.33977902" /> <window_info active="true" anchor="bottom" id="Logcat" order="4" visible="true" weight="0.21666667" />
<window_info anchor="bottom" id="Debug" order="5" /> <window_info anchor="bottom" id="Debug" order="5" />
<window_info active="true" anchor="bottom" id="Terminal" order="6" visible="true" weight="0.4812239" /> <window_info anchor="bottom" id="Terminal" order="6" weight="0.25555557" />
<window_info anchor="bottom" id="Event Log" order="7" side_tool="true" /> <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="Flutter Performance" order="8" side_tool="true" />
<window_info anchor="bottom" id="Version Control" order="9" /> <window_info anchor="bottom" id="Version Control" order="9" />
<window_info anchor="bottom" id="Messages" order="10" weight="0.3451417" /> <window_info anchor="bottom" id="Messages" order="10" weight="0.34444445" />
<window_info anchor="right" id="Device File Explorer" order="0" side_tool="true" weight="0.32960597" /> <window_info anchor="right" id="Device File Explorer" order="0" side_tool="true" weight="0.32960597" />
<window_info anchor="right" id="Capture Analysis" order="1" /> <window_info anchor="right" id="Capture Analysis" order="1" />
<window_info anchor="right" id="Theme Preview" order="2" /> <window_info anchor="right" id="Theme Preview" order="2" />
...@@ -332,9 +347,6 @@ ...@@ -332,9 +347,6 @@
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/pubspec.lock">
<provider selected="true" editor-type-id="text-editor" />
</entry>
<entry file="file://$PROJECT_DIR$/example/pubspec.yaml"> <entry file="file://$PROJECT_DIR$/example/pubspec.yaml">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="330"> <state relative-caret-position="330">
...@@ -385,25 +397,12 @@ ...@@ -385,25 +397,12 @@
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/pubspec.yaml">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="44">
<caret line="2" column="9" selection-start-line="2" selection-start-column="9" selection-end-line="2" selection-end-column="16" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/example/android/app/app.iml"> <entry file="file://$PROJECT_DIR$/example/android/app/app.iml">
<provider selected="true" editor-type-id="text-editor" /> <provider selected="true" editor-type-id="text-editor" />
</entry> </entry>
<entry file="file://$PROJECT_DIR$/ios/Classes/Image/AlbumItem.m"> <entry file="file://$PROJECT_DIR$/ios/Classes/Image/AlbumItem.m">
<provider selected="true" editor-type-id="text-editor" /> <provider selected="true" editor-type-id="text-editor" />
</entry> </entry>
<entry file="file://$PROJECT_DIR$/ios/Classes/Image/AlbumItem.h">
<provider selected="true" editor-type-id="text-editor" />
</entry>
<entry file="file://$PROJECT_DIR$/ios/Classes/Image/ResultManager.m">
<provider selected="true" editor-type-id="text-editor" />
</entry>
<entry file="file://$PROJECT_DIR$/android/src/main/java/com/example/gengmei_flutter_plugin/ImagePlugin/repository/ImageRespository.kt"> <entry file="file://$PROJECT_DIR$/android/src/main/java/com/example/gengmei_flutter_plugin/ImagePlugin/repository/ImageRespository.kt">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="1276"> <state relative-caret-position="1276">
...@@ -418,13 +417,6 @@ ...@@ -418,13 +417,6 @@
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/ios/Classes/GengmeiFlutterPlugin.h">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="88">
<caret line="4" selection-start-line="4" selection-end-line="4" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/android/src/main/java/com/example/gengmei_flutter_plugin/result/ResultManager.kt"> <entry file="file://$PROJECT_DIR$/android/src/main/java/com/example/gengmei_flutter_plugin/result/ResultManager.kt">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="814"> <state relative-caret-position="814">
...@@ -432,23 +424,6 @@ ...@@ -432,23 +424,6 @@
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/android/src/main/java/com/example/gengmei_flutter_plugin/GengmeiFlutterPlugin.kt">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="3938">
<caret line="207" column="93" selection-start-line="207" selection-start-column="80" selection-end-line="207" selection-end-column="93" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/ios/Classes/Image/ResultManager.h">
<provider selected="true" editor-type-id="text-editor" />
</entry>
<entry file="file://$PROJECT_DIR$/ios/Classes/GengmeiFlutterPlugin.m">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="330">
<caret line="15" column="4" selection-start-line="15" selection-start-column="4" selection-end-line="15" selection-end-column="4" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/android/src/main/java/com/example/gengmei_flutter_plugin/ImagePlugin/repository/luban/Engine.kt"> <entry file="file://$PROJECT_DIR$/android/src/main/java/com/example/gengmei_flutter_plugin/ImagePlugin/repository/luban/Engine.kt">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="1606"> <state relative-caret-position="1606">
...@@ -486,16 +461,6 @@ ...@@ -486,16 +461,6 @@
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/example/lib/AlbumModel/page/album/AlbumModel.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="1298">
<caret line="70" column="20" selection-start-line="70" selection-start-column="12" selection-end-line="70" selection-end-column="20" />
<folding>
<element signature="e#46#66#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/example/lib/AlbumModel/repository/AlbumRepository.dart"> <entry file="file://$PROJECT_DIR$/example/lib/AlbumModel/repository/AlbumRepository.dart">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="396"> <state relative-caret-position="396">
...@@ -554,5 +519,57 @@ ...@@ -554,5 +519,57 @@
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/ios/Classes/Image/AlbumItem.h">
<provider selected="true" editor-type-id="text-editor" />
</entry>
<entry file="file://$PROJECT_DIR$/ios/Classes/Image/ResultManager.m">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-138" />
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/ios/Classes/Image/ResultManager.h">
<provider selected="true" editor-type-id="text-editor" />
</entry>
<entry file="file://$PROJECT_DIR$/ios/Classes/GengmeiFlutterPlugin.h">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="88">
<caret line="4" selection-start-line="4" selection-end-line="4" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/ios/Classes/GengmeiFlutterPlugin.m">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="183">
<caret line="387" column="22" selection-start-line="387" selection-start-column="12" selection-end-line="387" selection-end-column="22" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/example/lib/AlbumModel/page/album/AlbumModel.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="111">
<caret line="74" column="7" selection-start-line="59" selection-start-column="4" selection-end-line="74" selection-end-column="7" />
<folding>
<element signature="e#46#66#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/android/src/main/java/com/example/gengmei_flutter_plugin/GengmeiFlutterPlugin.kt">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="1392">
<caret line="267" column="13" selection-start-line="267" selection-start-column="13" selection-end-line="267" selection-end-column="13" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/pubspec.lock">
<provider selected="true" editor-type-id="text-editor" />
</entry>
<entry file="file://$PROJECT_DIR$/pubspec.yaml">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="44">
<caret line="2" column="9" selection-start-line="2" selection-start-column="9" selection-end-line="2" selection-end-column="16" />
</state>
</provider>
</entry>
</component> </component>
</project> </project>
\ No newline at end of file
...@@ -3,7 +3,9 @@ package com.example.myimagepicker.repository ...@@ -3,7 +3,9 @@ package com.example.myimagepicker.repository
import android.content.Context import android.content.Context
import android.graphics.BitmapFactory import android.graphics.BitmapFactory
import android.os.Environment import android.os.Environment
import android.provider.MediaStore
import android.util.Log import android.util.Log
import com.example.gengmei_flutter_plugin.utils.MyUtil
import com.example.gengmei_flutter_plugin.utils.MyUtil.Companion.getFileFullName import com.example.gengmei_flutter_plugin.utils.MyUtil.Companion.getFileFullName
import com.example.gengmei_flutter_plugin.utils.MyUtil.Companion.getFileName import com.example.gengmei_flutter_plugin.utils.MyUtil.Companion.getFileName
import com.example.gengmei_flutter_plugin.utils.MyUtil.Companion.getImageCacheDir import com.example.gengmei_flutter_plugin.utils.MyUtil.Companion.getImageCacheDir
...@@ -11,6 +13,7 @@ import com.example.myimagepicker.bean.MediaFile ...@@ -11,6 +13,7 @@ import com.example.myimagepicker.bean.MediaFile
import com.example.myimagepicker.bean.MediaFolder import com.example.myimagepicker.bean.MediaFolder
import com.example.myimagepicker.luban.Luban import com.example.myimagepicker.luban.Luban
import com.example.myimagepicker.repository.local.ImageScanner import com.example.myimagepicker.repository.local.ImageScanner
import com.example.myimagepicker.repository.local.VideoScanner
import io.reactivex.Observable import io.reactivex.Observable
import io.reactivex.ObservableOnSubscribe import io.reactivex.ObservableOnSubscribe
import io.reactivex.android.schedulers.AndroidSchedulers import io.reactivex.android.schedulers.AndroidSchedulers
...@@ -35,7 +38,6 @@ class ImageRespository { ...@@ -35,7 +38,6 @@ class ImageRespository {
var finishOneTask = false var finishOneTask = false
val fileDir = Environment.getExternalStorageDirectory().absolutePath + "/GMAlbum/.album"; val fileDir = Environment.getExternalStorageDirectory().absolutePath + "/GMAlbum/.album";
//: HashMap<String, ArrayList<HashMap<String, Any>>> //: HashMap<String, ArrayList<HashMap<String, Any>>>
fun scanPhoneImage(context: Context): Observable<HashMap<String, ArrayList<HashMap<String, Any>>>> { fun scanPhoneImage(context: Context): Observable<HashMap<String, ArrayList<HashMap<String, Any>>>> {
...@@ -48,10 +50,15 @@ class ImageRespository { ...@@ -48,10 +50,15 @@ class ImageRespository {
.subscribeOn(Schedulers.computation()).observeOn(AndroidSchedulers.mainThread()) .subscribeOn(Schedulers.computation()).observeOn(AndroidSchedulers.mainThread())
} }
return Observable.create(ObservableOnSubscribe<HashMap<String, ArrayList<HashMap<String, Any>>>> { return Observable.create(ObservableOnSubscribe<HashMap<String, ArrayList<HashMap<String, Any>>>> {
it.onNext(getFinalMap(context, ImageScanner(context).queryMedia())) // val images = ArrayList<MediaFile>()
val images = ImageScanner(context).queryMedia()
val videos = VideoScanner(context).queryMedia()
images.addAll(videos)
it.onNext(getFinalMap(context, images))
}).subscribeOn(Schedulers.computation()).observeOn(AndroidSchedulers.mainThread()) }).subscribeOn(Schedulers.computation()).observeOn(AndroidSchedulers.mainThread())
} }
fun savePreviewImg(context: Context, listener: savePreviewListener) { fun savePreviewImg(context: Context, listener: savePreviewListener) {
val needSize = recordImageListMap.size; val needSize = recordImageListMap.size;
var currentSize = 0; var currentSize = 0;
...@@ -62,11 +69,16 @@ class ImageRespository { ...@@ -62,11 +69,16 @@ class ImageRespository {
val realPath = it["realPath"] as String val realPath = it["realPath"] as String
if (any == null) { if (any == null) {
globalThreadPool.execute { globalThreadPool.execute {
//getImageCacheDir(context, Luban.DEFAULT_DISK_CACHE_DIR)!!.absolutePath if (it["isVideo"] == "T") {
it["path"] = MyUtil.saveVideoImg("${fileDir}/${getFileName(realPath)!!}.png",
realPath, MediaStore.Images.Thumbnails.MICRO_KIND, 220, 220)
} else {
val get = Luban.with(context).setTargetDir(fileDir) val get = Luban.with(context).setTargetDir(fileDir)
.setName(getFileName(realPath)!!) .setName(getFileName(realPath)!!)
.get(realPath); .get(realPath);
it["path"] = get.absolutePath; it["path"] = get.absolutePath;
}
//getImageCacheDir(context, Luban.DEFAULT_DISK_CACHE_DIR)!!.absolutePath
synchronized(this) { synchronized(this) {
currentSize++; currentSize++;
noPathSize++; noPathSize++;
...@@ -158,6 +170,14 @@ class ImageRespository { ...@@ -158,6 +170,14 @@ class ImageRespository {
it.realPath?.run { it.realPath?.run {
itemMap.put("realPath", this) itemMap.put("realPath", this)
} }
it.isVideo?.run {
if (this) {
itemMap.put("isVideo", "T")
itemMap.put("during", "${it.duration}")
} else {
itemMap.put("isVideo", "F")
}
}
imageListMap.add(itemMap) imageListMap.add(itemMap)
} }
synchronized(this) { synchronized(this) {
...@@ -177,15 +197,30 @@ class ImageRespository { ...@@ -177,15 +197,30 @@ class ImageRespository {
finalList[this as String] = ArrayList<HashMap<String, Any>>() finalList[this as String] = ArrayList<HashMap<String, Any>>()
if (it["path"] == null) { if (it["path"] == null) {
val realPath = it["realPath"] as String val realPath = it["realPath"] as String
if (it["isVideo"] == "T") {
it["path"] = MyUtil.saveVideoImg("${fileDir}/${getFileName(realPath)!!}.png",
realPath, MediaStore.Images.Thumbnails.MINI_KIND, 300, 300)
} else {
val png = File("${fileDir}/${getFileName(realPath)!!}.png")
val jpg = File("${fileDir}/${getFileName(realPath)!!}.jpg")
val jpeg = File("${fileDir}/${getFileName(realPath)!!}.jpeg")
if (png.exists()) {
it["path"] = png.absolutePath
} else if (jpg.exists()) {
it["path"] = jpg.absolutePath
} else if (jpeg.exists()) {
it["path"] = jpeg.absolutePath
} else {
val get = Luban.with(context).setTargetDir( val get = Luban.with(context).setTargetDir(
fileDir fileDir
// getImageCacheDir(context, Luban.DEFAULT_DISK_CACHE_DIR)!!.absolutePath
) )
.setName(getFileName(realPath)!!) .setName(getFileName(realPath)!!)
.get(realPath); .get(realPath);
it["path"] = get.absolutePath it["path"] = get.absolutePath
Log.e("lsy", "封面照片 ${get.absolutePath}"); Log.e("lsy", "封面照片 ${get.absolutePath}");
} }
}
}
finalList[this]!!.add(it); finalList[this]!!.add(it);
} else { } else {
finalList[this as String]!!.add(it); finalList[this as String]!!.add(it);
......
...@@ -15,5 +15,6 @@ data class MediaFile( ...@@ -15,5 +15,6 @@ data class MediaFile(
var size: Long = 0, var size: Long = 0,
var isBigIm: Boolean = false, var isBigIm: Boolean = false,
var bigScare: Float = 0f, var bigScare: Float = 0f,
var realPath: String? = null var realPath: String? = null,
var isVideo: Boolean? = null
) )
...@@ -60,6 +60,7 @@ class ImageScanner(var context: Context) : AbsMediaScanner<MediaFile>(context) { ...@@ -60,6 +60,7 @@ class ImageScanner(var context: Context) : AbsMediaScanner<MediaFile>(context) {
mediaFile.dateToken = dateToken mediaFile.dateToken = dateToken
mediaFile.size = size mediaFile.size = size
mediaFile.realPath = path mediaFile.realPath = path
mediaFile.isVideo = false
val dir = Environment.getExternalStorageDirectory().absolutePath + "/GMAlbum/.album"; val dir = Environment.getExternalStorageDirectory().absolutePath + "/GMAlbum/.album";
// val dir = getImageCacheDir(context, Luban.DEFAULT_DISK_CACHE_DIR)!!.absolutePath; // val dir = getImageCacheDir(context, Luban.DEFAULT_DISK_CACHE_DIR)!!.absolutePath;
val tempFilePngString = dir + "/" + getFileName(path)!! + ".png"; val tempFilePngString = dir + "/" + getFileName(path)!! + ".png";
......
...@@ -3,8 +3,11 @@ package com.example.myimagepicker.repository.local ...@@ -3,8 +3,11 @@ package com.example.myimagepicker.repository.local
import android.content.Context import android.content.Context
import android.database.Cursor import android.database.Cursor
import android.net.Uri import android.net.Uri
import android.os.Environment
import android.provider.MediaStore import android.provider.MediaStore
import com.example.gengmei_flutter_plugin.utils.MyUtil
import com.example.myimagepicker.bean.MediaFile import com.example.myimagepicker.bean.MediaFile
import java.io.File
/** /**
* Created by lsy * Created by lsy
...@@ -19,16 +22,19 @@ class VideoScanner(private val mContext: Context) : AbsMediaScanner<MediaFile>(m ...@@ -19,16 +22,19 @@ class VideoScanner(private val mContext: Context) : AbsMediaScanner<MediaFile>(m
override val projection: Array<String> override val projection: Array<String>
get() = get() =
arrayOf(MediaStore.Video.Media.DATA, MediaStore.Video.Media.MIME_TYPE, MediaStore.Video.Media.BUCKET_ID, MediaStore.Video.Media.BUCKET_DISPLAY_NAME, MediaStore.Video.Media.DURATION, MediaStore.Video.Media.DATE_TAKEN) arrayOf(MediaStore.Video.Media.DATA, MediaStore.Video.Media.MIME_TYPE, MediaStore.Video.Media.BUCKET_ID, MediaStore.Video.Media.BUCKET_DISPLAY_NAME, MediaStore.Video.Media.DURATION, MediaStore.Video.Media.DATE_TAKEN, MediaStore.Images.Media.SIZE
)
override val order: String override val order: String
get() = MediaStore.Video.Media.DATE_TAKEN + " desc" get() = MediaStore.Video.Media.DATE_TAKEN + " desc"
override val selectionArgs: Array<String>? override val selectionArgs: Array<String>?
get() = null // get() = null
get() = arrayOf("video/mp4", "video/avi")
override val selection: String override val selection: String
get() = "" get() = (MediaStore.Video.Media.MIME_TYPE + "=? or "
+ MediaStore.Video.Media.MIME_TYPE + "=?")
/** /**
...@@ -47,12 +53,31 @@ class VideoScanner(private val mContext: Context) : AbsMediaScanner<MediaFile>(m ...@@ -47,12 +53,31 @@ class VideoScanner(private val mContext: Context) : AbsMediaScanner<MediaFile>(m
val dateToken = cursor.getLong(cursor.getColumnIndex(MediaStore.Video.Media.DATE_TAKEN)) val dateToken = cursor.getLong(cursor.getColumnIndex(MediaStore.Video.Media.DATE_TAKEN))
val mediaFile = MediaFile() val mediaFile = MediaFile()
mediaFile.path = path mediaFile.realPath = path
mediaFile.mime = mime mediaFile.mime = mime
mediaFile.folderId = folderId mediaFile.folderId = folderId
mediaFile.folderName = folderName mediaFile.folderName = folderName
mediaFile.duration = duration mediaFile.duration = duration
mediaFile.dateToken = dateToken mediaFile.dateToken = dateToken
mediaFile.isVideo=true
val dir = Environment.getExternalStorageDirectory().absolutePath + "/GMAlbum/.album"
// val dir = getImageCacheDir(context, Luban.DEFAULT_DISK_CACHE_DIR)!!.absolutePath;
val tempFilePngString = dir + "/" + MyUtil.getFileName(path)!! + ".png";
val tempFilePngExists = File(tempFilePngString).exists()
if (tempFilePngExists) {
mediaFile.path = tempFilePngString;
}
val tempFileJpgString = dir + "/" + MyUtil.getFileName(path)!! + ".jpg";
val tempFileJpgExists = File(tempFileJpgString).exists()
if (tempFileJpgExists) {
mediaFile.path = tempFileJpgString;
}
val tempFileJpegString = dir + "/" + MyUtil.getFileName(path)!! + ".jpeg"
val tempFileJpegExists = File(tempFileJpegString).exists()
if (tempFileJpegExists) {
mediaFile.path = tempFileJpegString;
}
return mediaFile return mediaFile
} }
......
...@@ -4,6 +4,12 @@ import android.content.Context ...@@ -4,6 +4,12 @@ import android.content.Context
import android.util.Log import android.util.Log
import com.example.myimagepicker.luban.Luban import com.example.myimagepicker.luban.Luban
import java.io.File import java.io.File
import android.media.ThumbnailUtils
import android.graphics.Bitmap
import android.util.DebugUtils
import java.io.FileOutputStream
import java.lang.Exception
/** /**
* @author lsy * @author lsy
...@@ -13,7 +19,7 @@ import java.io.File ...@@ -13,7 +19,7 @@ import java.io.File
class MyUtil { class MyUtil {
companion object{ companion object {
fun getImageCacheDir(context: Context, cacheName: String): File? { fun getImageCacheDir(context: Context, cacheName: String): File? {
val cacheDir = context.externalCacheDir val cacheDir = context.externalCacheDir
if (cacheDir != null) { if (cacheDir != null) {
...@@ -49,5 +55,28 @@ class MyUtil { ...@@ -49,5 +55,28 @@ class MyUtil {
null null
} }
} }
fun saveVideoImg(filePath: String, videoPath: String, kind: Int, width: Int, height: Int): String {
val file = File(filePath);
var bitmap: Bitmap? = null
// 获取视频的缩略图
bitmap = ThumbnailUtils.createVideoThumbnail(videoPath, kind)
if (width > 0 && height > 0) {
bitmap = ThumbnailUtils.extractThumbnail(bitmap, width, height,
ThumbnailUtils.OPTIONS_RECYCLE_INPUT)
}
try {
val out = FileOutputStream(file)
bitmap.compress(Bitmap.CompressFormat.PNG, 80, out)
out.flush()
out.close()
bitmap.recycle()
} catch (e: Exception) {
e.printStackTrace()
}
return filePath
}
} }
} }
...@@ -5,35 +5,35 @@ packages: ...@@ -5,35 +5,35 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: async name: async
url: "https://pub.dartlang.org" url: "https://pub.flutter-io.cn"
source: hosted source: hosted
version: "2.2.0" version: "2.2.0"
boolean_selector: boolean_selector:
dependency: transitive dependency: transitive
description: description:
name: boolean_selector name: boolean_selector
url: "https://pub.dartlang.org" url: "https://pub.flutter-io.cn"
source: hosted source: hosted
version: "1.0.4" version: "1.0.4"
charcode: charcode:
dependency: transitive dependency: transitive
description: description:
name: charcode name: charcode
url: "https://pub.dartlang.org" url: "https://pub.flutter-io.cn"
source: hosted source: hosted
version: "1.1.2" version: "1.1.2"
collection: collection:
dependency: transitive dependency: transitive
description: description:
name: collection name: collection
url: "https://pub.dartlang.org" url: "https://pub.flutter-io.cn"
source: hosted source: hosted
version: "1.14.11" version: "1.14.11"
cupertino_icons: cupertino_icons:
dependency: "direct main" dependency: "direct main"
description: description:
name: cupertino_icons name: cupertino_icons
url: "https://pub.dartlang.org" url: "https://pub.flutter-io.cn"
source: hosted source: hosted
version: "0.1.2" version: "0.1.2"
flutter: flutter:
...@@ -57,44 +57,44 @@ packages: ...@@ -57,44 +57,44 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: matcher name: matcher
url: "https://pub.dartlang.org" url: "https://pub.flutter-io.cn"
source: hosted source: hosted
version: "0.12.5" version: "0.12.5"
meta: meta:
dependency: transitive dependency: transitive
description: description:
name: meta name: meta
url: "https://pub.dartlang.org" url: "https://pub.flutter-io.cn"
source: hosted source: hosted
version: "1.1.6" version: "1.1.6"
path: path:
dependency: transitive dependency: transitive
description: description:
name: path name: path
url: "https://pub.dartlang.org" url: "https://pub.flutter-io.cn"
source: hosted source: hosted
version: "1.6.2" version: "1.6.2"
pedantic: pedantic:
dependency: transitive dependency: transitive
description: description:
name: pedantic name: pedantic
url: "https://pub.dartlang.org" url: "https://pub.flutter-io.cn"
source: hosted source: hosted
version: "1.7.0" version: "1.7.0"
quiver: quiver:
dependency: transitive dependency: transitive
description: description:
name: quiver name: quiver
url: "https://pub.dartlang.org" url: "https://pub.flutter-io.cn"
source: hosted source: hosted
version: "2.0.3" version: "2.0.3"
rxdart: rxdart:
dependency: "direct main" dependency: "direct main"
description: description:
name: rxdart name: rxdart
url: "https://pub.dartlang.org" url: "https://pub.flutter-io.cn"
source: hosted source: hosted
version: "0.22.3" version: "0.22.4"
sky_engine: sky_engine:
dependency: transitive dependency: transitive
description: flutter description: flutter
...@@ -104,56 +104,56 @@ packages: ...@@ -104,56 +104,56 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: source_span name: source_span
url: "https://pub.dartlang.org" url: "https://pub.flutter-io.cn"
source: hosted source: hosted
version: "1.5.5" version: "1.5.5"
stack_trace: stack_trace:
dependency: transitive dependency: transitive
description: description:
name: stack_trace name: stack_trace
url: "https://pub.dartlang.org" url: "https://pub.flutter-io.cn"
source: hosted source: hosted
version: "1.9.3" version: "1.9.3"
stream_channel: stream_channel:
dependency: transitive dependency: transitive
description: description:
name: stream_channel name: stream_channel
url: "https://pub.dartlang.org" url: "https://pub.flutter-io.cn"
source: hosted source: hosted
version: "2.0.0" version: "2.0.0"
string_scanner: string_scanner:
dependency: transitive dependency: transitive
description: description:
name: string_scanner name: string_scanner
url: "https://pub.dartlang.org" url: "https://pub.flutter-io.cn"
source: hosted source: hosted
version: "1.0.4" version: "1.0.4"
term_glyph: term_glyph:
dependency: transitive dependency: transitive
description: description:
name: term_glyph name: term_glyph
url: "https://pub.dartlang.org" url: "https://pub.flutter-io.cn"
source: hosted source: hosted
version: "1.1.0" version: "1.1.0"
test_api: test_api:
dependency: transitive dependency: transitive
description: description:
name: test_api name: test_api
url: "https://pub.dartlang.org" url: "https://pub.flutter-io.cn"
source: hosted source: hosted
version: "0.2.5" version: "0.2.5"
typed_data: typed_data:
dependency: transitive dependency: transitive
description: description:
name: typed_data name: typed_data
url: "https://pub.dartlang.org" url: "https://pub.flutter-io.cn"
source: hosted source: hosted
version: "1.1.6" version: "1.1.6"
vector_math: vector_math:
dependency: transitive dependency: transitive
description: description:
name: vector_math name: vector_math
url: "https://pub.dartlang.org" url: "https://pub.flutter-io.cn"
source: hosted source: hosted
version: "2.0.8" version: "2.0.8"
sdks: sdks:
......
...@@ -17,7 +17,6 @@ ...@@ -17,7 +17,6 @@
<excludeFolder url="file://$MODULE_DIR$/example/ios/.symlinks/plugins/gengmei_flutter_plugin/example/.dart_tool" /> <excludeFolder url="file://$MODULE_DIR$/example/ios/.symlinks/plugins/gengmei_flutter_plugin/example/.dart_tool" />
<excludeFolder url="file://$MODULE_DIR$/example/ios/.symlinks/plugins/gengmei_flutter_plugin/example/.pub" /> <excludeFolder url="file://$MODULE_DIR$/example/ios/.symlinks/plugins/gengmei_flutter_plugin/example/.pub" />
<excludeFolder url="file://$MODULE_DIR$/example/ios/.symlinks/plugins/gengmei_flutter_plugin/example/build" /> <excludeFolder url="file://$MODULE_DIR$/example/ios/.symlinks/plugins/gengmei_flutter_plugin/example/build" />
<excludeFolder url="file://$MODULE_DIR$/example/ios/.symlinks/plugins/gengmei_flutter_plugin/example/ios/Flutter/App.framework/flutter_assets/packages" />
<excludeFolder url="file://$MODULE_DIR$/example/ios/Flutter/App.framework/flutter_assets/packages" /> <excludeFolder url="file://$MODULE_DIR$/example/ios/Flutter/App.framework/flutter_assets/packages" />
</content> </content>
<orderEntry type="sourceFolder" forTests="false" /> <orderEntry type="sourceFolder" forTests="false" />
......
...@@ -413,6 +413,11 @@ bool isRunning=false; ...@@ -413,6 +413,11 @@ bool isRunning=false;
self.nowSize++; self.nowSize++;
NSMutableDictionary* queryItemDict = [NSMutableDictionary dictionary]; NSMutableDictionary* queryItemDict = [NSMutableDictionary dictionary];
[queryItemDict setObject:tmpPath forKey:@"path"]; [queryItemDict setObject:tmpPath forKey:@"path"];
if(assets.mediaType==PHAssetMediaTypeVideo){
[queryItemDict setObject:@"T" forKey:@"isVideo"];
}else{
[queryItemDict setObject:@"F" forKey:@"isVideo"];
}
NSMutableArray * arr=self.finalMap[docName]; NSMutableArray * arr=self.finalMap[docName];
if (arr==nil) { if (arr==nil) {
self.finalMap[docName]=[NSMutableArray array]; self.finalMap[docName]=[NSMutableArray array];
...@@ -460,6 +465,11 @@ bool isRunning=false; ...@@ -460,6 +465,11 @@ bool isRunning=false;
NSMutableDictionary* queryItemDict = [NSMutableDictionary dictionary]; NSMutableDictionary* queryItemDict = [NSMutableDictionary dictionary];
[queryItemDict setObject:tmpPath forKey:@"path"]; [queryItemDict setObject:tmpPath forKey:@"path"];
[queryItemDict setObject:imgName forKey:@"name"]; [queryItemDict setObject:imgName forKey:@"name"];
if(assets.mediaType==PHAssetMediaTypeVideo){
[queryItemDict setObject:@"T" forKey:@"isVideo"];
}else{
[queryItemDict setObject:@"F" forKey:@"isVideo"];
}
NSMutableArray * arr=self.finalMap[docName]; NSMutableArray * arr=self.finalMap[docName];
self.nowSize++; self.nowSize++;
if (arr==nil) { if (arr==nil) {
...@@ -507,8 +517,21 @@ bool isRunning=false; ...@@ -507,8 +517,21 @@ bool isRunning=false;
__block NSString *tmpPath=[cacheDirectory stringByAppendingPathComponent:imgName]; __block NSString *tmpPath=[cacheDirectory stringByAppendingPathComponent:imgName];
if ([fileManager fileExistsAtPath:realPath]==YES){ if ([fileManager fileExistsAtPath:realPath]==YES){
self.nowSize++; self.nowSize++;
if(assets.mediaType==PHAssetMediaTypeVideo){
PHVideoRequestOptions *options = [[PHVideoRequestOptions alloc] init];
options.version = PHImageRequestOptionsVersionCurrent;
options.networkAccessAllowed = true;
options.deliveryMode = PHVideoRequestOptionsDeliveryModeAutomatic;
[[PHImageManager defaultManager]requestAVAssetForVideo:assets options:options resultHandler:^(AVAsset * _Nullable asset, AVAudioMix * _Nullable audioMix, NSDictionary * _Nullable info) {
}];
}else{
}
NSLog(@"!!!REAL IS EXIE!! %@",realPath); NSLog(@"!!!REAL IS EXIE!! %@",realPath);
NSMutableArray<NSMutableDictionary<NSString*,NSObject*>*>* array=self.finalMap[docName]; NSMutableArray<NSMutableDictionary<NSString*,NSObject*>*>* array=self.finalMap[docName];
for (int x=0; x<[array count]; x++) { for (int x=0; x<[array count]; x++) {
NSMutableDictionary<NSString*,NSObject*>* map=[array objectAtIndex:x]; NSMutableDictionary<NSString*,NSObject*>* map=[array objectAtIndex:x];
NSString* index=[map objectForKey:@"path"]; NSString* index=[map objectForKey:@"path"];
......
...@@ -11,12 +11,13 @@ class ScanImagePlugn { ...@@ -11,12 +11,13 @@ class ScanImagePlugn {
Map<String, List<ScanImageItem>> newMap = new Map(); Map<String, List<ScanImageItem>> newMap = new Map();
images.forEach((k, v) { images.forEach((k, v) {
List<ScanImageItem> tempList = new List(); List<ScanImageItem> tempList = new List();
print("-------UP ${k} ${tempList.length}");
for (var item in v) { for (var item in v) {
ScanImageItem scanImageItem = new ScanImageItem(); ScanImageItem scanImageItem = new ScanImageItem();
scanImageItem.path = item["path"]; scanImageItem.path = item["path"] ?? "";
scanImageItem.size = item["size"]; scanImageItem.size = item["size"] ?? "";
scanImageItem.realPath = item["realPath"]; scanImageItem.realPath = item["realPath"] ?? "";
scanImageItem.isVideo = item["isVideo"] == "T" ? true : false;
scanImageItem.during = item["during"] ?? "";
tempList.add(scanImageItem); tempList.add(scanImageItem);
} }
newMap.putIfAbsent(k, () => tempList); newMap.putIfAbsent(k, () => tempList);
...@@ -38,6 +39,7 @@ class ScanImagePlugn { ...@@ -38,6 +39,7 @@ class ScanImagePlugn {
class ScanImageItem { class ScanImageItem {
String path; String path;
String realPath; String realPath;
String during;
bool isVideo;
int size; int size;
bool isSelected = false;
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment