Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
F
flutter_plugin
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
林生雨
flutter_plugin
Commits
387e3374
Commit
387e3374
authored
Oct 09, 2019
by
林生雨
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
commit
parent
14a8a5b0
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
304 additions
and
181 deletions
+304
-181
workspace.xml
.idea/workspace.xml
+154
-91
build_file_checksums.ser
android/.idea/caches/build_file_checksums.ser
+0
-0
AlbumModel.dart
example/lib/AlbumModel/page/album/AlbumModel.dart
+2
-2
GengmeiFlutterPlugin.m
ios/Classes/GengmeiFlutterPlugin.m
+148
-88
No files found.
.idea/workspace.xml
View file @
387e3374
...
@@ -6,7 +6,11 @@
...
@@ -6,7 +6,11 @@
</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$/example/lib/main.dart"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/example/lib/main.dart"
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$/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/example/lib/AlbumModel/page/album/AlbumModel.dart"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/example/ios/.symlinks/plugins/gengmei_flutter_plugin/example/lib/AlbumModel/page/album/AlbumModel.dart"
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/lib/AlbumModel/page/album/AlbumModel.dart"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/example/lib/AlbumModel/page/album/AlbumModel.dart"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/ios/Classes/GengmeiFlutterPlugin.m"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/ios/Classes/GengmeiFlutterPlugin.m"
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/"
/>
...
@@ -28,55 +32,76 @@
...
@@ -28,55 +32,76 @@
<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$/
android/src/main/java/com/example/gengmei_flutter_plugin/GengmeiFlutterPlugin.k
t"
>
<entry
file=
"file://$PROJECT_DIR$/
example/lib/main.dar
t"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"611"
>
<state
relative-caret-position=
"270"
>
<caret
line=
"238"
column=
"5"
selection-start-line=
"238"
selection-start-column=
"5"
selection-end-line=
"238"
selection-end-column=
"5"
/>
<caret
line=
"134"
column=
"46"
selection-start-line=
"134"
selection-start-column=
"46"
selection-end-line=
"134"
selection-end-column=
"46"
/>
<folding>
<element
signature=
"e#0#17#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=
"true"
>
<entry
file=
"file://$PROJECT_DIR$/example/lib/
main
.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=
"
493
"
>
<state
relative-caret-position=
"
118
"
>
<caret
line=
"
54"
column=
"9"
selection-start-line=
"54"
selection-start-column=
"9"
selection-end-line=
"54"
selection-end-column=
"9
"
/>
<caret
line=
"
101"
column=
"38"
selection-start-line=
"101"
selection-start-column=
"38"
selection-end-line=
"101"
selection-end-column=
"38
"
/>
<folding>
<folding>
<element
signature=
"e#
0#17
#0"
expanded=
"true"
/>
<element
signature=
"e#
46#66
#0"
expanded=
"true"
/>
</folding>
</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$/ios/Classes/Image/AlbumItem.h"
>
<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=
"176"
>
<caret
line=
"23"
column=
"47"
selection-start-line=
"23"
selection-start-column=
"47"
selection-end-line=
"23"
selection-end-column=
"47"
/>
<folding>
<element
signature=
"e#46#106#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$/ios/Classes/Image/ResultManager.m"
>
<entry
file=
"file://$PROJECT_DIR$/example/lib/AlbumModel/page/album/AlbumPage.dart"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
/>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"286"
>
<caret
line=
"31"
column=
"20"
selection-start-line=
"31"
selection-start-column=
"20"
selection-end-line=
"31"
selection-end-column=
"20"
/>
<folding>
<element
signature=
"e#45#62#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$/ios/Classes/Image/ResultManager.h"
>
<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=
"1144"
>
<caret
line=
"71"
column=
"45"
selection-start-line=
"71"
selection-start-column=
"45"
selection-end-line=
"71"
selection-end-column=
"45"
/>
</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$/
ios/Classes/GengmeiFlutterPlugin.h
"
>
<entry
file=
"file://$PROJECT_DIR$/
android/src/main/java/com/example/gengmei_flutter_plugin/ImagePlugin/repository/luban/Checker.java
"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
88
"
>
<state
relative-caret-position=
"
2
"
>
<caret
line=
"
4"
selection-start-line=
"4"
selection-end-line=
"4
"
/>
<caret
line=
"
14"
column=
"12"
selection-start-line=
"14"
selection-start-column=
"12"
selection-end-line=
"14"
selection-end-column=
"12
"
/>
</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$/
ios/Classes/GengmeiFlutterPlugin.m
"
>
<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=
"
2
67"
>
<state
relative-caret-position=
"
3
67"
>
<caret
line=
"
14"
column=
"4"
selection-start-line=
"14"
selection-start-column=
"4"
selection-end-line=
"14"
selection-end-column=
"4
"
/>
<caret
line=
"
81"
column=
"9"
selection-start-line=
"81"
selection-start-column=
"9"
selection-end-line=
"81"
selection-end-column=
"9
"
/>
</state>
</state>
</provider>
</provider>
</entry>
</entry>
...
@@ -84,8 +109,8 @@
...
@@ -84,8 +109,8 @@
<file
pinned=
"false"
current-in-tab=
"false"
>
<file
pinned=
"false"
current-in-tab=
"false"
>
<entry
file=
"file://$PROJECT_DIR$/lib/ScanImagePlugn.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=
"
30
8"
>
<state
relative-caret-position=
"
8
8"
>
<caret
line=
"
17"
column=
"47"
selection-start-line=
"17"
selection-start-column=
"39"
selection-end-line=
"17"
selection-end-column=
"47
"
/>
<caret
line=
"
7"
column=
"50"
selection-start-line=
"7"
selection-start-column=
"50"
selection-end-line=
"7"
selection-end-column=
"50
"
/>
</state>
</state>
</provider>
</provider>
</entry>
</entry>
...
@@ -93,8 +118,8 @@
...
@@ -93,8 +118,8 @@
<file
pinned=
"false"
current-in-tab=
"false"
>
<file
pinned=
"false"
current-in-tab=
"false"
>
<entry
file=
"file://$PROJECT_DIR$/lib/gengmei_flutter_plugin.dart"
>
<entry
file=
"file://$PROJECT_DIR$/lib/gengmei_flutter_plugin.dart"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
33
0"
>
<state
relative-caret-position=
"
16
0"
>
<caret
line=
"1
5"
column=
"47"
selection-start-line=
"15"
selection-start-column=
"47"
selection-end-line=
"15"
selection-end-column=
"4
7"
/>
<caret
line=
"1
8"
column=
"37"
selection-start-line=
"18"
selection-start-column=
"37"
selection-end-line=
"18"
selection-end-column=
"3
7"
/>
<folding>
<folding>
<element
signature=
"e#0#20#0"
expanded=
"true"
/>
<element
signature=
"e#0#20#0"
expanded=
"true"
/>
</folding>
</folding>
...
@@ -105,7 +130,7 @@
...
@@ -105,7 +130,7 @@
<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$/lib/SharedPlugin.dart"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"1
184
"
>
<state
relative-caret-position=
"1
467
"
>
<caret
line=
"76"
column=
"75"
selection-start-line=
"76"
selection-start-column=
"75"
selection-end-line=
"76"
selection-end-column=
"75"
/>
<caret
line=
"76"
column=
"75"
selection-start-line=
"76"
selection-start-column=
"75"
selection-end-line=
"76"
selection-end-column=
"75"
/>
</state>
</state>
</provider>
</provider>
...
@@ -131,6 +156,7 @@
...
@@ -131,6 +156,7 @@
<find>
nativeCamera
</find>
<find>
nativeCamera
</find>
<find>
native
</find>
<find>
native
</find>
<find>
getStringList
</find>
<find>
getStringList
</find>
<find>
init!!!
</find>
</findStrings>
</findStrings>
</component>
</component>
<component
name=
"Git.Settings"
>
<component
name=
"Git.Settings"
>
...
@@ -149,7 +175,6 @@
...
@@ -149,7 +175,6 @@
<option
value=
"$PROJECT_DIR$/lib/ScanImagePlugn.dart"
/>
<option
value=
"$PROJECT_DIR$/lib/ScanImagePlugn.dart"
/>
<option
value=
"$PROJECT_DIR$/android/src/main/kotlin/com/example/gengmei_flutter_plugin/sharedPrefernces/SharedManager.kt"
/>
<option
value=
"$PROJECT_DIR$/android/src/main/kotlin/com/example/gengmei_flutter_plugin/sharedPrefernces/SharedManager.kt"
/>
<option
value=
"$PROJECT_DIR$/example/lib/AlbumModel/repository/AlbumRepository.dart"
/>
<option
value=
"$PROJECT_DIR$/example/lib/AlbumModel/repository/AlbumRepository.dart"
/>
<option
value=
"$PROJECT_DIR$/example/lib/AlbumModel/page/album/AlbumModel.dart"
/>
<option
value=
"$PROJECT_DIR$/lib/gengmei_flutter_plugin.dart"
/>
<option
value=
"$PROJECT_DIR$/lib/gengmei_flutter_plugin.dart"
/>
<option
value=
"$PROJECT_DIR$/lib/SharedPlugin.dart"
/>
<option
value=
"$PROJECT_DIR$/lib/SharedPlugin.dart"
/>
<option
value=
"$PROJECT_DIR$/pubspec.yaml"
/>
<option
value=
"$PROJECT_DIR$/pubspec.yaml"
/>
...
@@ -157,14 +182,17 @@
...
@@ -157,14 +182,17 @@
<option
value=
"$PROJECT_DIR$/android/build.gradle"
/>
<option
value=
"$PROJECT_DIR$/android/build.gradle"
/>
<option
value=
"$PROJECT_DIR$/.gitignore"
/>
<option
value=
"$PROJECT_DIR$/.gitignore"
/>
<option
value=
"$PROJECT_DIR$/example/lib/main.dart"
/>
<option
value=
"$PROJECT_DIR$/example/lib/main.dart"
/>
<option
value=
"$PROJECT_DIR$/android/src/main/java/com/example/gengmei_flutter_plugin/ImagePlugin/repository/ImageRespository.kt"
/>
<option
value=
"$PROJECT_DIR$/android/src/main/java/com/example/gengmei_flutter_plugin/ImagePlugin/repository/luban/Engine.kt"
/>
<option
value=
"$PROJECT_DIR$/example/lib/AlbumModel/page/album/AlbumModel.dart"
/>
</list>
</list>
</option>
</option>
</component>
</component>
<component
name=
"ProjectFrameBounds"
extendedState=
"6"
>
<component
name=
"ProjectFrameBounds"
>
<option
name=
"x"
value=
"
-41
"
/>
<option
name=
"x"
value=
"
490
"
/>
<option
name=
"y"
value=
"-1080"
/>
<option
name=
"y"
value=
"-1080"
/>
<option
name=
"width"
value=
"1
92
0"
/>
<option
name=
"width"
value=
"1
44
0"
/>
<option
name=
"height"
value=
"
1080
"
/>
<option
name=
"height"
value=
"
812
"
/>
</component>
</component>
<component
name=
"ProjectLevelVcsManager"
settingsEditedManually=
"true"
/>
<component
name=
"ProjectLevelVcsManager"
settingsEditedManually=
"true"
/>
<component
name=
"ProjectView"
>
<component
name=
"ProjectView"
>
...
@@ -172,6 +200,8 @@
...
@@ -172,6 +200,8 @@
<foldersAlwaysOnTop
value=
"true"
/>
<foldersAlwaysOnTop
value=
"true"
/>
</navigator>
</navigator>
<panes>
<panes>
<pane
id=
"Scope"
/>
<pane
id=
"PackagesPane"
/>
<pane
id=
"ProjectPane"
>
<pane
id=
"ProjectPane"
>
<subPane>
<subPane>
<expand>
<expand>
...
@@ -208,6 +238,30 @@
...
@@ -208,6 +238,30 @@
<item
name=
"example"
type=
"462c0819:PsiDirectoryNode"
/>
<item
name=
"example"
type=
"462c0819:PsiDirectoryNode"
/>
<item
name=
"lib"
type=
"462c0819:PsiDirectoryNode"
/>
<item
name=
"lib"
type=
"462c0819:PsiDirectoryNode"
/>
</path>
</path>
<path>
<item
name=
"gengmei_flutter_plugin"
type=
"b2602c69:ProjectViewProjectNode"
/>
<item
name=
"gengmei_flutter_plugin"
type=
"462c0819:PsiDirectoryNode"
/>
<item
name=
"example"
type=
"462c0819:PsiDirectoryNode"
/>
<item
name=
"lib"
type=
"462c0819:PsiDirectoryNode"
/>
<item
name=
"AlbumModel"
type=
"462c0819:PsiDirectoryNode"
/>
</path>
<path>
<item
name=
"gengmei_flutter_plugin"
type=
"b2602c69:ProjectViewProjectNode"
/>
<item
name=
"gengmei_flutter_plugin"
type=
"462c0819:PsiDirectoryNode"
/>
<item
name=
"example"
type=
"462c0819:PsiDirectoryNode"
/>
<item
name=
"lib"
type=
"462c0819:PsiDirectoryNode"
/>
<item
name=
"AlbumModel"
type=
"462c0819:PsiDirectoryNode"
/>
<item
name=
"page"
type=
"462c0819:PsiDirectoryNode"
/>
</path>
<path>
<item
name=
"gengmei_flutter_plugin"
type=
"b2602c69:ProjectViewProjectNode"
/>
<item
name=
"gengmei_flutter_plugin"
type=
"462c0819:PsiDirectoryNode"
/>
<item
name=
"example"
type=
"462c0819:PsiDirectoryNode"
/>
<item
name=
"lib"
type=
"462c0819:PsiDirectoryNode"
/>
<item
name=
"AlbumModel"
type=
"462c0819:PsiDirectoryNode"
/>
<item
name=
"page"
type=
"462c0819:PsiDirectoryNode"
/>
<item
name=
"album"
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"
/>
...
@@ -236,8 +290,6 @@
...
@@ -236,8 +290,6 @@
</subPane>
</subPane>
</pane>
</pane>
<pane
id=
"AndroidView"
/>
<pane
id=
"AndroidView"
/>
<pane
id=
"PackagesPane"
/>
<pane
id=
"Scope"
/>
</panes>
</panes>
</component>
</component>
<component
name=
"PropertiesComponent"
>
<component
name=
"PropertiesComponent"
>
...
@@ -283,9 +335,10 @@
...
@@ -283,9 +335,10 @@
<servers
/>
<servers
/>
</component>
</component>
<component
name=
"ToolWindowManager"
>
<component
name=
"ToolWindowManager"
>
<frame
x=
"-41"
y=
"-1080"
width=
"1920"
height=
"1080"
extended-state=
"6"
/>
<frame
x=
"490"
y=
"-1080"
width=
"1440"
height=
"812"
extended-state=
"0"
/>
<editor
active=
"true"
/>
<layout>
<layout>
<window_info
active=
"true"
content_ui=
"combo"
id=
"Project"
order=
"0"
visible=
"true"
weight=
"0.169
86156
"
/>
<window_info
active=
"true"
content_ui=
"combo"
id=
"Project"
order=
"0"
visible=
"true"
weight=
"0.169
5279
"
/>
<window_info
id=
"Captures"
order=
"1"
side_tool=
"true"
/>
<window_info
id=
"Captures"
order=
"1"
side_tool=
"true"
/>
<window_info
id=
"Structure"
order=
"2"
side_tool=
"true"
/>
<window_info
id=
"Structure"
order=
"2"
side_tool=
"true"
/>
<window_info
id=
"Image Layers"
order=
"3"
/>
<window_info
id=
"Image Layers"
order=
"3"
/>
...
@@ -300,7 +353,7 @@
...
@@ -300,7 +353,7 @@
<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.6425591"
/>
<window_info
anchor=
"bottom"
id=
"Logcat"
order=
"4"
weight=
"0.6425591"
/>
<window_info
anchor=
"bottom"
id=
"Debug"
order=
"5"
/>
<window_info
anchor=
"bottom"
id=
"Debug"
order=
"5"
/>
<window_info
anchor=
"bottom"
id=
"Terminal"
order=
"6"
weight=
"0.20555556
"
/>
<window_info
anchor=
"bottom"
id=
"Terminal"
order=
"6"
visible=
"true"
weight=
"0.22638889
"
/>
<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"
/>
...
@@ -316,17 +369,6 @@
...
@@ -316,17 +369,6 @@
</layout>
</layout>
</component>
</component>
<component
name=
"editorHistoryManager"
>
<component
name=
"editorHistoryManager"
>
<entry
file=
"file://$USER_HOME$/Downloads/flutter/bin/cache/pkg/sky_engine/lib/io/directory.dart"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"265"
>
<caret
line=
"114"
column=
"15"
selection-start-line=
"114"
selection-start-column=
"15"
selection-end-line=
"114"
selection-end-column=
"15"
/>
</state>
</provider>
</entry>
<entry
file=
"file://$USER_HOME$/Downloads/flutter/.pub-cache/hosted/pub.flutter-io.cn/path_provider-0.4.1/lib/path_provider.dart"
/>
<entry
file=
"file://$PROJECT_DIR$/example/android/app/src/main/res/drawable/launch_background.xml"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
/>
</entry>
<entry
file=
"file://$PROJECT_DIR$/LICENSE"
>
<entry
file=
"file://$PROJECT_DIR$/LICENSE"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
/>
<provider
selected=
"true"
editor-type-id=
"text-editor"
/>
</entry>
</entry>
...
@@ -405,36 +447,6 @@
...
@@ -405,36 +447,6 @@
<provider
selected=
"true"
editor-type-id=
"text-editor"
/>
<provider
selected=
"true"
editor-type-id=
"text-editor"
/>
</entry>
</entry>
<entry
file=
"file://$PROJECT_DIR$/android/src/main/kotlin/com/example/gengmei_flutter_plugin/sharedPrefernces/SharedManager.kt"
/>
<entry
file=
"file://$PROJECT_DIR$/android/src/main/kotlin/com/example/gengmei_flutter_plugin/sharedPrefernces/SharedManager.kt"
/>
<entry
file=
"file://$PROJECT_DIR$/example/lib/AlbumModel/page/album/AlbumModel.dart"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"4158"
>
<caret
line=
"200"
column=
"37"
selection-start-line=
"200"
selection-start-column=
"37"
selection-end-line=
"200"
selection-end-column=
"37"
/>
<folding>
<element
signature=
"e#46#66#0"
expanded=
"true"
/>
</folding>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/example/lib/AlbumModel/page/album/AlbumPage.dart"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"3894"
>
<caret
line=
"186"
column=
"43"
selection-start-line=
"186"
selection-start-column=
"43"
selection-end-line=
"186"
selection-end-column=
"43"
/>
<folding>
<element
signature=
"e#45#62#0"
expanded=
"true"
/>
</folding>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/example/lib/AlbumModel/repository/AlbumRepository.dart"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"770"
>
<caret
line=
"40"
column=
"27"
selection-start-line=
"40"
selection-start-column=
"27"
selection-end-line=
"40"
selection-end-column=
"27"
/>
<folding>
<element
signature=
"e#46#106#0"
expanded=
"true"
/>
</folding>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/lib/A.dart"
/>
<entry
file=
"file://$PROJECT_DIR$/lib/A.dart"
/>
<entry
file=
"file://$PROJECT_DIR$/android/src/main/java/com/example/gengmei_flutter_plugin/a"
/>
<entry
file=
"file://$PROJECT_DIR$/android/src/main/java/com/example/gengmei_flutter_plugin/a"
/>
<entry
file=
"file://$PROJECT_DIR$/android/build.gradle"
>
<entry
file=
"file://$PROJECT_DIR$/android/build.gradle"
>
...
@@ -494,6 +506,13 @@
...
@@ -494,6 +506,13 @@
<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$/android/src/main/java/com/example/gengmei_flutter_plugin/GengmeiFlutterPlugin.kt"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"4620"
>
<caret
line=
"238"
column=
"5"
selection-start-line=
"238"
selection-start-column=
"5"
selection-end-line=
"238"
selection-end-column=
"5"
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/ios/Classes/Image/AlbumItem.h"
>
<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"
/>
</entry>
</entry>
...
@@ -512,48 +531,92 @@
...
@@ -512,48 +531,92 @@
</entry>
</entry>
<entry
file=
"file://$PROJECT_DIR$/ios/Classes/GengmeiFlutterPlugin.m"
>
<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=
"
267
"
>
<state
relative-caret-position=
"
330
"
>
<caret
line=
"1
4"
column=
"4"
selection-start-line=
"14"
selection-start-column=
"4"
selection-end-line=
"14
"
selection-end-column=
"4"
/>
<caret
line=
"1
5"
column=
"4"
selection-start-line=
"15"
selection-start-column=
"4"
selection-end-line=
"15
"
selection-end-column=
"4"
/>
</state>
</state>
</provider>
</provider>
</entry>
</entry>
<entry
file=
"file://$PROJECT_DIR$/
lib/ScanImagePlugn.dar
t"
>
<entry
file=
"file://$PROJECT_DIR$/
android/src/main/java/com/example/gengmei_flutter_plugin/ImagePlugin/repository/ImageRespository.k
t"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"308"
>
<state
relative-caret-position=
"1144"
>
<caret
line=
"17"
column=
"47"
selection-start-line=
"17"
selection-start-column=
"39"
selection-end-line=
"17"
selection-end-column=
"47"
/>
<caret
line=
"71"
column=
"45"
selection-start-line=
"71"
selection-start-column=
"45"
selection-end-line=
"71"
selection-end-column=
"45"
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/android/src/main/java/com/example/gengmei_flutter_plugin/ImagePlugin/repository/luban/Checker.java"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"2"
>
<caret
line=
"14"
column=
"12"
selection-start-line=
"14"
selection-start-column=
"12"
selection-end-line=
"14"
selection-end-column=
"12"
/>
</state>
</provider>
</entry>
<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"
>
<state
relative-caret-position=
"367"
>
<caret
line=
"81"
column=
"9"
selection-start-line=
"81"
selection-start-column=
"9"
selection-end-line=
"81"
selection-end-column=
"9"
/>
</state>
</state>
</provider>
</provider>
</entry>
</entry>
<entry
file=
"file://$PROJECT_DIR$/lib/SharedPlugin.dart"
>
<entry
file=
"file://$PROJECT_DIR$/lib/SharedPlugin.dart"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"1
184
"
>
<state
relative-caret-position=
"1
467
"
>
<caret
line=
"76"
column=
"75"
selection-start-line=
"76"
selection-start-column=
"75"
selection-end-line=
"76"
selection-end-column=
"75"
/>
<caret
line=
"76"
column=
"75"
selection-start-line=
"76"
selection-start-column=
"75"
selection-end-line=
"76"
selection-end-column=
"75"
/>
</state>
</state>
</provider>
</provider>
</entry>
</entry>
<entry
file=
"file://$PROJECT_DIR$/example/lib/main.dart"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"270"
>
<caret
line=
"134"
column=
"46"
selection-start-line=
"134"
selection-start-column=
"46"
selection-end-line=
"134"
selection-end-column=
"46"
/>
<folding>
<element
signature=
"e#0#17#0"
expanded=
"true"
/>
</folding>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/example/lib/AlbumModel/page/album/AlbumPage.dart"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"286"
>
<caret
line=
"31"
column=
"20"
selection-start-line=
"31"
selection-start-column=
"20"
selection-end-line=
"31"
selection-end-column=
"20"
/>
<folding>
<element
signature=
"e#45#62#0"
expanded=
"true"
/>
</folding>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/lib/ScanImagePlugn.dart"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"88"
>
<caret
line=
"7"
column=
"50"
selection-start-line=
"7"
selection-start-column=
"50"
selection-end-line=
"7"
selection-end-column=
"50"
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/lib/gengmei_flutter_plugin.dart"
>
<entry
file=
"file://$PROJECT_DIR$/lib/gengmei_flutter_plugin.dart"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
33
0"
>
<state
relative-caret-position=
"
16
0"
>
<caret
line=
"1
5"
column=
"47"
selection-start-line=
"15"
selection-start-column=
"47"
selection-end-line=
"15"
selection-end-column=
"4
7"
/>
<caret
line=
"1
8"
column=
"37"
selection-start-line=
"18"
selection-start-column=
"37"
selection-end-line=
"18"
selection-end-column=
"3
7"
/>
<folding>
<folding>
<element
signature=
"e#0#20#0"
expanded=
"true"
/>
<element
signature=
"e#0#20#0"
expanded=
"true"
/>
</folding>
</folding>
</state>
</state>
</provider>
</provider>
</entry>
</entry>
<entry
file=
"file://$PROJECT_DIR$/
android/src/main/java/com/example/gengmei_flutter_plugin/GengmeiFlutterPlugin.k
t"
>
<entry
file=
"file://$PROJECT_DIR$/
example/lib/AlbumModel/repository/AlbumRepository.dar
t"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"611"
>
<state
relative-caret-position=
"176"
>
<caret
line=
"238"
column=
"5"
selection-start-line=
"238"
selection-start-column=
"5"
selection-end-line=
"238"
selection-end-column=
"5"
/>
<caret
line=
"23"
column=
"47"
selection-start-line=
"23"
selection-start-column=
"47"
selection-end-line=
"23"
selection-end-column=
"47"
/>
<folding>
<element
signature=
"e#46#106#0"
expanded=
"true"
/>
</folding>
</state>
</state>
</provider>
</provider>
</entry>
</entry>
<entry
file=
"file://$PROJECT_DIR$/example/lib/
main
.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=
"
493
"
>
<state
relative-caret-position=
"
118
"
>
<caret
line=
"
54"
column=
"9"
selection-start-line=
"54"
selection-start-column=
"9"
selection-end-line=
"54"
selection-end-column=
"9
"
/>
<caret
line=
"
101"
column=
"38"
selection-start-line=
"101"
selection-start-column=
"38"
selection-end-line=
"101"
selection-end-column=
"38
"
/>
<folding>
<folding>
<element
signature=
"e#
0#17
#0"
expanded=
"true"
/>
<element
signature=
"e#
46#66
#0"
expanded=
"true"
/>
</folding>
</folding>
</state>
</state>
</provider>
</provider>
...
...
android/.idea/caches/build_file_checksums.ser
View file @
387e3374
No preview for this file type
example/lib/AlbumModel/page/album/AlbumModel.dart
View file @
387e3374
...
@@ -94,11 +94,11 @@ class AlbumModel {
...
@@ -94,11 +94,11 @@ class AlbumModel {
}
}
void
initScanImages
(
BuildContext
context
)
{
void
initScanImages
(
BuildContext
context
)
{
if
(
isAndroid
)
{
//
if (isAndroid) {
_listen
=
GengmeiFlutterPlugin
.
phoneImagesEvent
_listen
=
GengmeiFlutterPlugin
.
phoneImagesEvent
.
receiveBroadcastStream
()
.
receiveBroadcastStream
()
.
listen
(
_onEvent
,
onError:
_onError
);
.
listen
(
_onEvent
,
onError:
_onError
);
}
//
}
AlbumRepository
.
getInstance
().
scanPhoneImg
().
listen
((
value
)
{
AlbumRepository
.
getInstance
().
scanPhoneImg
().
listen
((
value
)
{
if
(
value
!=
null
)
{
if
(
value
!=
null
)
{
_mainValue
=
value
;
_mainValue
=
value
;
...
...
ios/Classes/GengmeiFlutterPlugin.m
View file @
387e3374
...
@@ -8,22 +8,25 @@
...
@@ -8,22 +8,25 @@
//@property(nonatomic)FlutterResult result;
//@property(nonatomic)FlutterResult result;
@property
(
atomic
)
int
needSize
;
@property
(
atomic
)
int
needSize
;
@property
(
nonatomic
)
int
nowSize
;
@property
(
nonatomic
)
int
nowSize
;
@property
(
atomic
)
int
copySize
;
@property
(
nonatomic
)
int
tempSize
;
@property
(
nonatomic
)
int
tempSize
;
@property
(
nonatomic
)
long
resultKey
;
@property
(
nonatomic
)
long
resultKey
;
@property
(
nonatomic
)
long
nativeCameraKey
;
@property
(
nonatomic
)
long
nativeCameraKey
;
@property
(
strong
,
non
atomic
)
NSMutableDictionary
<
NSString
*
,
NSMutableArray
<
NSMutableDictionary
<
NSString
*
,
NSObject
*>*>*>*
finalMap
;
@property
(
strong
,
atomic
)
NSMutableDictionary
<
NSString
*
,
NSMutableArray
<
NSMutableDictionary
<
NSString
*
,
NSObject
*>*>*>*
finalMap
;
@property
(
nonatomic
,
strong
)
UIImagePickerController
*
imagePicker
;
@property
(
nonatomic
,
strong
)
UIImagePickerController
*
imagePicker
;
@property
(
atomic
)
Boolean
quitPage
;
@property
(
atomic
)
Boolean
quitPage
;
@property
(
atomic
)
Boolean
execdTask
;
@property
(
atomic
)
Boolean
execdTask
;
@property
(
atomic
)
Boolean
finishScanImg
;
@end
@end
@implementation
GengmeiFlutterPlugin
{
@implementation
GengmeiFlutterPlugin
FlutterEventSink
_eventSink
;
}
FlutterEventSink
_eventSink
;
NSMutableArray
<
AlbumItem
*>
*
assetCollectionList
;
NSMutableArray
<
AlbumItem
*>
*
assetCollectionList
;
UIViewController
*
viewController
;
UIViewController
*
viewController
;
dispatch_queue_t
queue
;
dispatch_queue_t
queue
;
NSObject
<
FlutterPluginRegistrar
>*
resign
;
NSObject
<
FlutterPluginRegistrar
>*
resign
;
FlutterEventSink
_eventSink
;
+
(
void
)
registerWithRegistrar
:(
NSObject
<
FlutterPluginRegistrar
>*
)
registrar
{
+
(
void
)
registerWithRegistrar
:(
NSObject
<
FlutterPluginRegistrar
>*
)
registrar
{
GengmeiFlutterPlugin
*
instance
=
[[
GengmeiFlutterPlugin
alloc
]
init
];
GengmeiFlutterPlugin
*
instance
=
[[
GengmeiFlutterPlugin
alloc
]
init
];
// resign=registrar;
// resign=registrar;
...
@@ -39,7 +42,6 @@ NSObject<FlutterPluginRegistrar>* resign;
...
@@ -39,7 +42,6 @@ NSObject<FlutterPluginRegistrar>* resign;
eventChannelWithName
:
@"gengmei_flutter_plugin_event"
eventChannelWithName
:
@"gengmei_flutter_plugin_event"
binaryMessenger
:[
registrar
messenger
]];
binaryMessenger
:[
registrar
messenger
]];
[
chargingChannel
setStreamHandler
:
instance
];
[
chargingChannel
setStreamHandler
:
instance
];
}
}
...
@@ -47,12 +49,27 @@ NSObject<FlutterPluginRegistrar>* resign;
...
@@ -47,12 +49,27 @@ NSObject<FlutterPluginRegistrar>* resign;
self
.
resultKey
++
;
self
.
resultKey
++
;
[[
ResultManager
sharedSingleton
]
addResult
:[
NSNumber
numberWithLong
:
self
.
resultKey
]
:
result
];
[[
ResultManager
sharedSingleton
]
addResult
:[
NSNumber
numberWithLong
:
self
.
resultKey
]
:
result
];
if
([
@"scan_image_picker"
isEqualToString
:
call
.
method
])
{
if
([
@"scan_image_picker"
isEqualToString
:
call
.
method
])
{
NSString
*
mediaType
=
AVMediaTypeVideo
;
//读取媒体类型
ALAuthorizationStatus
author
=
[
ALAssetsLibrary
authorizationStatus
];
AVAuthorizationStatus
authStatus
=
[
AVCaptureDevice
authorizationStatusForMediaType
:
mediaType
];
//读取设备授权状态
NSString
*
mediaType
=
AVMediaTypeVideo
;
//读取媒体类型
if
(
authStatus
==
AVAuthorizationStatusRestricted
||
authStatus
==
AVAuthorizationStatusDenied
){
AVAuthorizationStatus
authStatus
=
[
AVCaptureDevice
authorizationStatusForMediaType
:
mediaType
];
//读取设备授权状态
NSString
*
errorStr
=
@"应用相机权限受限,请在iPhone的“设置-隐私-相机”选项中,允许好享玩访问你的相机。"
;
if
(
author
==
AVAuthorizationStatusRestricted
||
authStatus
==
AVAuthorizationStatusDenied
)
{
NSLog
(
@"相机不可用"
);
NSLog
(
@"没给权限!!!"
);
}
else
{
}
else
if
(
author
==
AVAuthorizationStatusNotDetermined
){
[
PHPhotoLibrary
requestAuthorization
:
^
(
PHAuthorizationStatus
status
)
{
if
(
status
==
PHAuthorizationStatusAuthorized
)
{
dispatch_async
(
dispatch_get_main_queue
(),
^
{
// 用户点击 "OK"
long
temp
=
self
.
resultKey
;
[
self
scanPhone
:
temp
];
});
}
else
{
dispatch_async
(
dispatch_get_main_queue
(),
^
{
// 用户点击 不允许访问
NSLog
(
@"被拒绝 TODO!!"
);
});
}
}];
}
else
{
NSLog
(
@"相机可用"
);
NSLog
(
@"相机可用"
);
long
temp
=
self
.
resultKey
;
long
temp
=
self
.
resultKey
;
[
self
scanPhone
:
temp
];
[
self
scanPhone
:
temp
];
...
@@ -64,7 +81,13 @@ NSObject<FlutterPluginRegistrar>* resign;
...
@@ -64,7 +81,13 @@ NSObject<FlutterPluginRegistrar>* resign;
if
(
authStatus
==
AVAuthorizationStatusRestricted
||
authStatus
==
AVAuthorizationStatusDenied
){
if
(
authStatus
==
AVAuthorizationStatusRestricted
||
authStatus
==
AVAuthorizationStatusDenied
){
NSString
*
errorStr
=
@"应用相机权限受限,请在iPhone的“设置-隐私-相机”选项中,允许好享玩访问你的相机。"
;
NSString
*
errorStr
=
@"应用相机权限受限,请在iPhone的“设置-隐私-相机”选项中,允许好享玩访问你的相机。"
;
NSLog
(
@"相机不可用"
);
NSLog
(
@"相机不可用"
);
}
else
{
}
else
if
(
authStatus
==
AVAuthorizationStatusNotDetermined
){
[
AVCaptureDevice
requestAccessForMediaType
:
AVMediaTypeVideo
completionHandler
:
^
(
BOOL
granted
)
{
if
(
granted
){
[
self
nativeCamera
];
}
}];
}
else
{
NSLog
(
@"相机可用"
);
NSLog
(
@"相机可用"
);
[
self
nativeCamera
];
[
self
nativeCamera
];
}
}
...
@@ -251,23 +274,18 @@ NSObject<FlutterPluginRegistrar>* resign;
...
@@ -251,23 +274,18 @@ NSObject<FlutterPluginRegistrar>* resign;
if
(
self
.
finalMap
==
nil
)
{
if
(
self
.
finalMap
==
nil
)
{
self
.
finalMap
=
[
NSMutableDictionary
dictionary
];
self
.
finalMap
=
[
NSMutableDictionary
dictionary
];
}
}
if
([
self
.
finalMap
count
]
>
0
&&
self
.
execdTask
)
{
if
([
self
.
finalMap
count
]
>
0
&&
self
.
finishScanImg
)
{
[
self
resultImgs
:
resultId
];
[
self
resultImgs
:
resultId
];
return
;
return
;
}
}
self
.
nowSize
=
0
;
self
.
nowSize
=
0
;
static
dispatch_once_t
onceToken
;
self
.
needSize
=
0
;
dispatch_once
(
&
onceToken
,
^
{
[
self
.
finalMap
removeAllObjects
];
NSLog
(
@"init!!!"
);
[
assetCollectionList
removeAllObjects
];
self
.
needSize
=
0
;
dispatch_async
(
dispatch_get_global_queue
(
DISPATCH_QUEUE_PRIORITY_HIGH
,
0
),
^
{
[
self
.
finalMap
removeAllObjects
];
[
assetCollectionList
removeAllObjects
];
[
self
scanPhoneImage
];
[
self
scanPhoneImage
];
[
self
copyImg
:
resultId
];
[
self
copyImg
:
resultId
];
});
});
// dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_HIGH, 0), ^{
//
// });
}
}
-
(
void
)
scanPhoneImage
{
-
(
void
)
scanPhoneImage
{
...
@@ -311,8 +329,23 @@ NSObject<FlutterPluginRegistrar>* resign;
...
@@ -311,8 +329,23 @@ NSObject<FlutterPluginRegistrar>* resign;
return
;
return
;
}
}
dispatch_async
(
dispatch_get_main_queue
(),
^
{
dispatch_async
(
dispatch_get_main_queue
(),
^
{
self
.
finishScanImg
=
true
;
[[
ResultManager
sharedSingleton
]
resultSuccess
:[
NSNumber
numberWithLong
:
resultId
]
:
self
.
finalMap
];
[[
ResultManager
sharedSingleton
]
resultSuccess
:[
NSNumber
numberWithLong
:
resultId
]
:
self
.
finalMap
];
if
(
self
.
execdTask
){
return
;
}
self
.
execdTask
=
true
;
self
.
execdTask
=
true
;
dispatch_async
(
dispatch_get_global_queue
(
DISPATCH_QUEUE_PRIORITY_HIGH
,
0
),
^
{
[
self
execRealImg
];
});
});
}
-
(
void
)
upImgs
{
dispatch_async
(
dispatch_get_main_queue
(),
^
{
if
(
_eventSink
!=
nil
&&!
self
.
quitPage
){
_eventSink
(
self
.
finalMap
);
}
});
});
}
}
...
@@ -322,24 +355,20 @@ NSObject<FlutterPluginRegistrar>* resign;
...
@@ -322,24 +355,20 @@ NSObject<FlutterPluginRegistrar>* resign;
for
(
int
j
=
0
;
j
<
assetCollectionList
.
count
;
j
++
)
{
for
(
int
j
=
0
;
j
<
assetCollectionList
.
count
;
j
++
)
{
AlbumItem
*
item
=
assetCollectionList
[
j
];
AlbumItem
*
item
=
assetCollectionList
[
j
];
PHFetchResult
<
PHAsset
*>
*
assetResult
=
[
item
assets
];
PHFetchResult
<
PHAsset
*>
*
assetResult
=
[
item
assets
];
NSLog
(
@"09090909090 %d %d"
,[
assetResult
count
],
self
.
needSize
);
for
(
int
i
=
0
;
i
<
[
assetResult
count
];
i
++
)
{
for
(
int
i
=
0
;
i
<
[
assetResult
count
];
i
++
)
{
__block
NSString
*
docName
=
[
item
collectionTitle
];
__block
NSString
*
docName
=
[
item
collectionTitle
];
PHAsset
*
assets
=
[
assetResult
objectAtIndex
:
i
];
PHAsset
*
assets
=
[
assetResult
objectAtIndex
:
i
];
__block
NSString
*
imgName
=
[
assets
valueForKey
:
@"filename"
];
__block
NSString
*
imgName
=
[
assets
valueForKey
:
@"filename"
];
NSString
*
imgRealName
=
[
NSString
stringWithFormat
:
@"%@_REAL"
,
imgName
];
if
(
imgName
==
nil
)
{
if
(
imgName
==
nil
)
{
NSLog
(
@"NEWWWW!!!!! image name is Null!!! "
);
NSLog
(
@"NEWWWW!!!!! image name is Null!!! "
);
NSString
*
timeSp
=
[
NSString
stringWithFormat
:
@"%ld"
,
(
long
)([[
NSDate
date
]
timeIntervalSince1970
]
*
100000
)];
NSString
*
timeSp
=
[
NSString
stringWithFormat
:
@"%ld"
,
(
long
)([[
NSDate
date
]
timeIntervalSince1970
]
*
100000
)];
imgName
=
[
NSString
stringWithFormat
:
@"IMG_%@"
,
timeSp
];
imgName
=
[
NSString
stringWithFormat
:
@"IMG_%@"
,
timeSp
];
imgRealName
=
[
NSString
stringWithFormat
:
@"REAL_PATH_IMG_%@"
,
timeSp
];
}
}
__block
NSString
*
tmpPath
=
[
cacheDirectory
stringByAppendingPathComponent
:
imgName
];
__block
NSString
*
tmpPath
=
[
cacheDirectory
stringByAppendingPathComponent
:
imgName
];
__block
NSString
*
realPath
=
[
cacheDirectory
stringByAppendingPathComponent
:
imgRealName
];
if
([
fileManager
fileExistsAtPath
:
tmpPath
]
==
YES
){
if
([
fileManager
fileExistsAtPath
:
tmpPath
]
==
YES
&&
[
fileManager
fileExistsAtPath
:
realPath
]
&&
false
){
self
.
nowSize
++
;
self
.
nowSize
++
;
NSMutableDictionary
*
queryItemDict
=
[
NSMutableDictionary
dictionary
];
NSMutableDictionary
*
queryItemDict
=
[
NSMutableDictionary
dictionary
];
[
queryItemDict
setObject
:
tmpPath
forKey
:
@"
realP
ath"
];
[
queryItemDict
setObject
:
tmpPath
forKey
:
@"
p
ath"
];
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
];
...
@@ -347,47 +376,29 @@ NSObject<FlutterPluginRegistrar>* resign;
...
@@ -347,47 +376,29 @@ NSObject<FlutterPluginRegistrar>* resign;
}
else
{
}
else
{
[
self
.
finalMap
[
docName
]
addObject
:
queryItemDict
];
[
self
.
finalMap
[
docName
]
addObject
:
queryItemDict
];
}
}
NSLog
(
@"SIZEEE %d %d "
,
self
.
nowSize
,
self
.
needSize
);
NSLog
(
@"S
CARE S
IZEEE %d %d "
,
self
.
nowSize
,
self
.
needSize
);
if
(
self
.
nowSize
==
self
.
needSize
)
{
if
(
self
.
nowSize
==
self
.
needSize
)
{
[
self
resultImgs
:
resultId
];
[
self
resultImgs
:
resultId
];
}
}
}
else
{
}
else
{
NSLog
(
@"file NOT EXIT !! "
);
PHImageRequestOptions
*
imageRequestOption
=
[[
PHImageRequestOptions
alloc
]
init
];
PHImageRequestOptions
*
imageRequestOption
=
[[
PHImageRequestOptions
alloc
]
init
];
imageRequestOption
.
synchronous
=
NO
;
imageRequestOption
.
synchronous
=
NO
;
int
picWidth
=
[
assets
pixelWidth
];
int
picWidth
=
[
assets
pixelWidth
];
int
picHeight
=
[
assets
pixelHeight
];
int
picHeight
=
[
assets
pixelHeight
];
// NSLog(@"WIDTH %d %d",picWidth,picHeight);
// float scareSize=1;
float
scareSize
=
1080
.
0
/
picWidth
;
// NSLog(@"SCARESIZE %d",picWidth);
CGSize
size
=
CGSizeMake
(
picWidth
*
scareSize
,
picHeight
*
scareSize
);
float
tempScareSize
=
320
.
0
/
picWidth
;
float
tempScareSize
=
320
.
0
/
picWidth
;
CGSize
temp
=
CGSizeMake
(
picWidth
*
tempScareSize
,
picHeight
*
tempScareSize
);
CGSize
temp
=
CGSizeMake
(
picWidth
*
tempScareSize
,
picHeight
*
tempScareSize
);
imageRequestOption
.
networkAccessAllowed
=
YES
;
imageRequestOption
.
networkAccessAllowed
=
YES
;
imageRequestOption
.
deliveryMode
=
PHImageRequestOptionsDeliveryModeHighQualityFormat
;
imageRequestOption
.
deliveryMode
=
PHImageRequestOptionsDeliveryModeHighQualityFormat
;
// imageRequestOption.deliveryMode=PHImageRequestOptionsDeliveryMode
HighQuality
Format;
// imageRequestOption.deliveryMode=PHImageRequestOptionsDeliveryMode
Fast
Format;
imageRequestOption
.
resizeMode
=
PHImageRequestOptionsResizeModeFast
;
imageRequestOption
.
resizeMode
=
PHImageRequestOptionsResizeModeFast
;
imageRequestOption
.
version
=
PHImageRequestOptionsVersionUnadjusted
;
//PHImageManagerMaximumSize
//PHImageManagerMaximumSize
[[
PHImageManager
defaultManager
]
requestImageForAsset
:
assets
targetSize
:
temp
contentMode
:
PHImageContentModeDefault
options
:
imageRequestOption
resultHandler
:^
(
UIImage
*
_Nullable
result
,
NSDictionary
*
_Nullable
info
)
{
PHImageRequestOptions
*
scareOpt
=
[[
PHImageRequestOptions
alloc
]
init
];
[
UIImageJPEGRepresentation
(
result
,
1
)
writeToFile
:
tmpPath
atomically
:
YES
];
scareOpt
.
networkAccessAllowed
=
YES
;
// [UIImageJPEGRepresentation([self image:result byScalingToSize:temp],0.8) writeToFile:realPath atomically:YES ];
scareOpt
.
deliveryMode
=
PHImageRequestOptionsDeliveryModeFastFormat
;
scareOpt
.
synchronous
=
NO
;
scareOpt
.
resizeMode
=
PHImageRequestOptionsResizeModeFast
;
scareOpt
.
version
=
PHImageRequestOptionsVersionUnadjusted
;
[[
PHImageManager
defaultManager
]
requestImageForAsset
:
assets
targetSize
:
size
contentMode
:
PHImageContentModeDefault
options
:
imageRequestOption
resultHandler
:^
(
UIImage
*
_Nullable
result
,
NSDictionary
*
_Nullable
info
)
{
// NSLog(@"INITTT___))))00000 %d %d %@",i,[assetResult count],info);
// NSURL * url = [info objectForKey:@"PHImageFileURLKey"];
// UIImage *getImage = [UIImage imageWithContentsOfFile:file];
// UIImageJPEGRepresentation(result,1)
[
UIImageJPEGRepresentation
(
result
,
1
)
writeToFile
:
realPath
atomically
:
YES
];
[
UIImageJPEGRepresentation
([
self
image
:
result
byScalingToSize
:
temp
],
0
.
8
)
writeToFile
:
realPath
atomically
:
YES
];
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"
];
[
queryItemDict
setObject
:
realPath
forKey
:
@"realPath"
];
NSMutableArray
*
arr
=
self
.
finalMap
[
docName
];
NSMutableArray
*
arr
=
self
.
finalMap
[
docName
];
self
.
nowSize
++
;
self
.
nowSize
++
;
if
(
arr
==
nil
)
{
if
(
arr
==
nil
)
{
...
@@ -396,39 +407,10 @@ NSObject<FlutterPluginRegistrar>* resign;
...
@@ -396,39 +407,10 @@ NSObject<FlutterPluginRegistrar>* resign;
}
else
{
}
else
{
[
self
.
finalMap
[
docName
]
addObject
:
queryItemDict
];
[
self
.
finalMap
[
docName
]
addObject
:
queryItemDict
];
}
}
NSLog
(
@"SCARE SIZEEE %d %d "
,
self
.
nowSize
,
self
.
needSize
);
NSLog
(
@"SIZEEE %d %d "
,
self
.
nowSize
,
self
.
needSize
);
if
(
self
.
nowSize
==
self
.
needSize
)
{
if
(
self
.
nowSize
==
self
.
needSize
)
{
[
self
resultImgs
:
resultId
];
[
self
resultImgs
:
resultId
];
}
}
// CFAbsoluteTime startTime =CFAbsoluteTimeGetCurrent();
// NSData * data=UIImageJPEGRepresentation(result,0.8);
// if(data==nil){
// NSLog(@"DATAISNULL");
// data=UIImagePNGRepresentation(result);
// }
// [data writeToFile:realPath atomically:YES];
// CFAbsoluteTime linkTime = (CFAbsoluteTimeGetCurrent() - startTime);
// NSLog(@"Linked in %f ms", linkTime *1000.0);
// UIImage * scareData=[self image:result byScalingToSize:size];
// [data writeToFile:realPath atomically:YES];
//
// if ([[NSFileManager defaultManager] createFileAtPath:realPath contents:data attributes:nil]){
//
// }
// UIImage * scareData=[self image:result byScalingToSize:size];
// NSData *data;
// if (UIImagePNGRepresentation(scareData) == nil){
// data = UIImageJPEGRepresentation(scareData, 1);
// } else {
// data = UIImagePNGRepresentation(scareData);
// }
// if ([[NSFileManager defaultManager] createFileAtPath:realPath contents:data attributes:nil]) {
// if ([[NSFileManager defaultManager] createFileAtPath:realPath contents:data attributes:nil]) {
// if ([[NSFileManager defaultManager] createFileAtPath:tmpPath contents:scareData attributes:nil]) {
// if ([[NSFileManager defaultManager] createFileAtPath:tmpPath contents:scareData attributes:nil]) {
// NSLog(@"result %@",tmpPath);
// NSLog(@"result %@",tmpPath);
...
@@ -461,6 +443,88 @@ NSObject<FlutterPluginRegistrar>* resign;
...
@@ -461,6 +443,88 @@ NSObject<FlutterPluginRegistrar>* resign;
}
}
}
}
-
(
void
)
execRealImg
{
self
.
nowSize
=
0
;
self
.
copySize
=
0
;
NSString
*
cacheDirectory
=
[
NSSearchPathForDirectoriesInDomains
(
NSCachesDirectory
,
NSUserDomainMask
,
YES
)
firstObject
];
NSFileManager
*
fileManager
=
[
NSFileManager
defaultManager
];
for
(
int
j
=
0
;
j
<
assetCollectionList
.
count
;
j
++
)
{
AlbumItem
*
item
=
assetCollectionList
[
j
];
PHFetchResult
<
PHAsset
*>
*
assetResult
=
[
item
assets
];
NSLog
(
@"09090909090 %d %d"
,[
assetResult
count
],
self
.
needSize
);
for
(
int
i
=
0
;
i
<
[
assetResult
count
];
i
++
)
{
__block
NSString
*
docName
=
[
item
collectionTitle
];
PHAsset
*
assets
=
[
assetResult
objectAtIndex
:
i
];
__block
NSString
*
imgName
=
[
assets
valueForKey
:
@"filename"
];
NSString
*
imgRealName
=
[
NSString
stringWithFormat
:
@"%@_REAL"
,
imgName
];
if
(
imgName
==
nil
)
{
NSLog
(
@"NEWWWW!!!!! image name is Null!!! "
);
NSString
*
timeSp
=
[
NSString
stringWithFormat
:
@"%ld"
,
(
long
)([[
NSDate
date
]
timeIntervalSince1970
]
*
100000
)];
imgName
=
[
NSString
stringWithFormat
:
@"IMG_%@"
,
timeSp
];
imgRealName
=
[
NSString
stringWithFormat
:
@"REAL_PATH_IMG_%@"
,
timeSp
];
}
__block
NSString
*
realPath
=
[
cacheDirectory
stringByAppendingPathComponent
:
imgRealName
];
__block
NSString
*
tmpPath
=
[
cacheDirectory
stringByAppendingPathComponent
:
imgName
];
if
([
fileManager
fileExistsAtPath
:
realPath
]
==
YES
){
self
.
nowSize
++
;
NSMutableArray
<
NSMutableDictionary
<
NSString
*
,
NSObject
*>*>*
array
=
self
.
finalMap
[
docName
];
for
(
int
x
=
0
;
x
<
[
array
count
];
x
++
)
{
NSMutableDictionary
<
NSString
*
,
NSObject
*>*
map
=
[
array
objectAtIndex
:
x
];
NSString
*
index
=
[
map
objectForKey
:
@"path"
];
if
([
index
isEqualToString
:
tmpPath
])
{
[
map
setObject
:
realPath
forKey
:
@"realPath"
];
}
}
NSLog
(
@"SIZEEE %d %d "
,
self
.
nowSize
,
self
.
needSize
);
if
(
self
.
nowSize
==
self
.
needSize
)
{
[
self
upImgs
];
self
.
execdTask
=
true
;
}
}
else
{
NSLog
(
@"file NOT EXIT !! "
);
PHImageRequestOptions
*
imageRequestOption
=
[[
PHImageRequestOptions
alloc
]
init
];
imageRequestOption
.
synchronous
=
YES
;
int
picWidth
=
[
assets
pixelWidth
];
int
picHeight
=
[
assets
pixelHeight
];
float
tempScareSize
;
if
(
picWidth
>
1080
.
0
){
tempScareSize
=
1080
.
0
/
picWidth
;
}
else
{
tempScareSize
=
1
;
}
CGSize
temp
=
CGSizeMake
(
picWidth
*
tempScareSize
,
picHeight
*
tempScareSize
);
imageRequestOption
.
networkAccessAllowed
=
YES
;
imageRequestOption
.
deliveryMode
=
PHImageRequestOptionsDeliveryModeHighQualityFormat
;
// imageRequestOption.deliveryMode=PHImageRequestOptionsDeliveryModeFastFormat;
imageRequestOption
.
resizeMode
=
PHImageRequestOptionsResizeModeFast
;
imageRequestOption
.
version
=
PHImageRequestOptionsVersionUnadjusted
;
[[
PHImageManager
defaultManager
]
requestImageForAsset
:
assets
targetSize
:
temp
contentMode
:
PHImageContentModeDefault
options
:
imageRequestOption
resultHandler
:^
(
UIImage
*
_Nullable
result
,
NSDictionary
*
_Nullable
info
)
{
[
UIImageJPEGRepresentation
(
result
,
1
)
writeToFile
:
realPath
atomically
:
YES
];
self
.
nowSize
++
;
self
.
copySize
++
;
NSMutableArray
<
NSMutableDictionary
<
NSString
*
,
NSObject
*>*>*
array
=
self
.
finalMap
[
docName
];
for
(
int
x
=
0
;
x
<
[
array
count
];
x
++
)
{
NSMutableDictionary
<
NSString
*
,
NSObject
*>*
map
=
[
array
objectAtIndex
:
x
];
NSString
*
index
=
[
map
objectForKey
:
@"path"
];
if
([
index
isEqualToString
:
tmpPath
])
{
[
map
setObject
:
realPath
forKey
:
@"realPath"
];
}
}
NSLog
(
@"SIZEEE %d %d %d"
,
self
.
nowSize
,
self
.
needSize
,
self
.
copySize
);
if
(
self
.
nowSize
==
self
.
needSize
)
{
[
self
upImgs
];
self
.
execdTask
=
true
;
}
else
if
(
self
.
copySize
%
15
==
0
){
NSLog
(
@"UPPP!!"
);
[
self
upImgs
];
}
}];
}
}
}
}
-
(
UIImage
*
)
image
:
(
UIImage
*
)
image
byScalingToSize
:
(
CGSize
)
targetSize
{
-
(
UIImage
*
)
image
:
(
UIImage
*
)
image
byScalingToSize
:
(
CGSize
)
targetSize
{
...
@@ -593,11 +657,8 @@ NSObject<FlutterPluginRegistrar>* resign;
...
@@ -593,11 +657,8 @@ NSObject<FlutterPluginRegistrar>* resign;
NSError
*
error
=
nil
;
NSError
*
error
=
nil
;
NSArray
*
fileList
=
[[
NSArray
alloc
]
init
];
NSArray
*
fileList
=
[[
NSArray
alloc
]
init
];
//fileList便是包含有该文件夹下所有文件的文件名及文件夹名的数组
//fileList便是包含有该文件夹下所有文件的文件名及文件夹名的数组
fileList
=
[
fileManager
contentsOfDirectoryAtPath
:
tmpDirectory
error
:
&
error
];
fileList
=
[
fileManager
contentsOfDirectoryAtPath
:
tmpDirectory
error
:
&
error
];
NSMutableArray
*
dirArray
=
[[
NSMutableArray
alloc
]
init
];
NSMutableArray
*
dirArray
=
[[
NSMutableArray
alloc
]
init
];
//在上面那段程序中获得的fileList中列出文件夹名
//在上面那段程序中获得的fileList中列出文件夹名
for
(
NSString
*
file
in
fileList
)
{
for
(
NSString
*
file
in
fileList
)
{
NSString
*
path
=
[
tmpDirectory
stringByAppendingPathComponent
:
file
];
NSString
*
path
=
[
tmpDirectory
stringByAppendingPathComponent
:
file
];
...
@@ -605,11 +666,10 @@ NSObject<FlutterPluginRegistrar>* resign;
...
@@ -605,11 +666,10 @@ NSObject<FlutterPluginRegistrar>* resign;
}
}
}
}
//FlutterEventSink _eventSink;
-
(
FlutterError
*
_Nullable
)
onListenWithArguments
:
(
id
_Nullable
)
arguments
-
(
FlutterError
*
_Nullable
)
onListenWithArguments
:
(
id
_Nullable
)
arguments
eventSink
:
(
FlutterEventSink
)
events
{
eventSink
:
(
FlutterEventSink
)
events
{
NSLog
(
@"QWEQWEQEW"
);
NSLog
(
@"QWEQWEQEW"
);
//
_eventSink = events;
_eventSink
=
events
;
return
nil
;
return
nil
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment