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
a67a1ed3
Commit
a67a1ed3
authored
Oct 10, 2019
by
林生雨
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
commit
parent
3f010139
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
147 additions
and
152 deletions
+147
-152
workspace.xml
.idea/workspace.xml
+76
-110
main.dart
example/lib/main.dart
+16
-3
GengmeiFlutterPlugin.m
ios/Classes/GengmeiFlutterPlugin.m
+55
-39
No files found.
.idea/workspace.xml
View file @
a67a1ed3
...
...
@@ -5,7 +5,13 @@
<option
name=
"TOOL_WINDOW_CONFIGURED_FILTER"
value=
"Show only selected application"
/>
</component>
<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$/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/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/main.dart"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/example/lib/main.dart"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/ios/Classes/GengmeiFlutterPlugin.m"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/ios/Classes/GengmeiFlutterPlugin.m"
afterDir=
"false"
/>
</list>
<ignored
path=
"$PROJECT_DIR$/.dart_tool/"
/>
<ignored
path=
"$PROJECT_DIR$/.idea/"
/>
<ignored
path=
"$PROJECT_DIR$/.pub/"
/>
...
...
@@ -24,11 +30,11 @@
<component
name=
"ExecutionTargetManager"
SELECTED_TARGET=
"AKC0218316000622"
/>
<component
name=
"FileEditorManager"
>
<leaf
SIDE_TABS_SIZE_LIMIT_KEY=
"300"
>
<file
pinned=
"false"
current-in-tab=
"
fals
e"
>
<file
pinned=
"false"
current-in-tab=
"
tru
e"
>
<entry
file=
"file://$PROJECT_DIR$/example/lib/main.dart"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"27
0
"
>
<caret
line=
"1
34"
column=
"46"
selection-start-line=
"134"
selection-start-column=
"46"
selection-end-line=
"134"
selection-end-column=
"46
"
/>
<state
relative-caret-position=
"27
4
"
>
<caret
line=
"1
48"
column=
"35"
selection-start-line=
"148"
selection-start-column=
"35"
selection-end-line=
"148"
selection-end-column=
"35
"
/>
<folding>
<element
signature=
"e#0#17#0"
expanded=
"true"
/>
</folding>
...
...
@@ -36,7 +42,7 @@
</provider>
</entry>
</file>
<file
pinned=
"false"
current-in-tab=
"
tru
e"
>
<file
pinned=
"false"
current-in-tab=
"
fals
e"
>
<entry
file=
"file://$PROJECT_DIR$/example/lib/AlbumModel/page/album/AlbumModel.dart"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"160"
>
...
...
@@ -49,43 +55,37 @@
</entry>
</file>
<file
pinned=
"false"
current-in-tab=
"false"
>
<entry
file=
"file://$PROJECT_DIR$/
example/lib/AlbumModel/repository/AlbumRepository.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"
>
<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
relative-caret-position=
"1276"
>
<caret
line=
"78"
column=
"45"
selection-start-line=
"78"
selection-start-column=
"45"
selection-end-line=
"78"
selection-end-column=
"45"
/>
</state>
</provider>
</entry>
</file>
<file
pinned=
"false"
current-in-tab=
"false"
>
<entry
file=
"file://$PROJECT_DIR$/
example/lib/AlbumModel/page/album/AlbumPage.dart
"
>
<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=
"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
relative-caret-position=
"88"
>
<caret
line=
"14"
column=
"12"
selection-start-line=
"14"
selection-start-column=
"12"
selection-end-line=
"14"
selection-end-column=
"12"
/>
</state>
</provider>
</entry>
</file>
<file
pinned=
"false"
current-in-tab=
"false"
>
<entry
file=
"file://$PROJECT_DIR$/
android/src/main/java/com/example/gengmei_flutter_plugin/ImagePlugin/repository/ImageRespository.kt
"
>
<entry
file=
"file://$PROJECT_DIR$/
ios/Classes/GengmeiFlutterPlugin.h
"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
1144
"
>
<caret
line=
"
78"
column=
"45"
selection-start-line=
"78"
selection-start-column=
"45"
selection-end-line=
"78"
selection-end-column=
"45
"
/>
<state
relative-caret-position=
"
88
"
>
<caret
line=
"
4"
selection-start-line=
"4"
selection-end-line=
"4
"
/>
</state>
</provider>
</entry>
</file>
<file
pinned=
"false"
current-in-tab=
"false"
>
<entry
file=
"file://$PROJECT_DIR$/
android/src/main/java/com/example/gengmei_flutter_plugin/ImagePlugin/repository/luban/Checker.java
"
>
<entry
file=
"file://$PROJECT_DIR$/
ios/Classes/GengmeiFlutterPlugin.m
"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
2
"
>
<caret
line=
"1
4"
column=
"12"
selection-start-line=
"14"
selection-start-column=
"12"
selection-end-line=
"14"
selection-end-column=
"12
"
/>
<state
relative-caret-position=
"
-511
"
>
<caret
line=
"1
5"
column=
"4"
selection-start-line=
"15"
selection-start-column=
"4"
selection-end-line=
"15"
selection-end-column=
"4
"
/>
</state>
</provider>
</entry>
...
...
@@ -93,7 +93,7 @@
<file
pinned=
"false"
current-in-tab=
"false"
>
<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
"
>
<state
relative-caret-position=
"
1606
"
>
<caret
line=
"81"
column=
"9"
selection-start-line=
"81"
selection-start-column=
"9"
selection-end-line=
"81"
selection-end-column=
"9"
/>
</state>
</provider>
...
...
@@ -111,7 +111,7 @@
<file
pinned=
"false"
current-in-tab=
"false"
>
<entry
file=
"file://$PROJECT_DIR$/lib/gengmei_flutter_plugin.dart"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
160
"
>
<state
relative-caret-position=
"
264
"
>
<caret
line=
"18"
column=
"37"
selection-start-line=
"18"
selection-start-column=
"37"
selection-end-line=
"18"
selection-end-column=
"37"
/>
<folding>
<element
signature=
"e#0#20#0"
expanded=
"true"
/>
...
...
@@ -123,7 +123,7 @@
<file
pinned=
"false"
current-in-tab=
"false"
>
<entry
file=
"file://$PROJECT_DIR$/lib/SharedPlugin.dart"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"1
467
"
>
<state
relative-caret-position=
"1
606
"
>
<caret
line=
"76"
column=
"75"
selection-start-line=
"76"
selection-start-column=
"75"
selection-end-line=
"76"
selection-end-column=
"75"
/>
</state>
</provider>
...
...
@@ -174,16 +174,16 @@
<option
value=
"$PROJECT_DIR$/lib/A.dart"
/>
<option
value=
"$PROJECT_DIR$/android/build.gradle"
/>
<option
value=
"$PROJECT_DIR$/.gitignore"
/>
<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"
/>
<option
value=
"$PROJECT_DIR$/example/lib/main.dart"
/>
</list>
</option>
</component>
<component
name=
"ProjectFrameBounds"
>
<option
name=
"x"
value=
"4
39
"
/>
<option
name=
"y"
value=
"-
1050
"
/>
<option
name=
"x"
value=
"4
94
"
/>
<option
name=
"y"
value=
"-
886
"
/>
<option
name=
"width"
value=
"1440"
/>
<option
name=
"height"
value=
"812"
/>
</component>
...
...
@@ -193,8 +193,6 @@
<foldersAlwaysOnTop
value=
"true"
/>
</navigator>
<panes>
<pane
id=
"Scope"
/>
<pane
id=
"PackagesPane"
/>
<pane
id=
"ProjectPane"
>
<subPane>
<expand>
...
...
@@ -202,49 +200,16 @@
<item
name=
"gengmei_flutter_plugin"
type=
"b2602c69:ProjectViewProjectNode"
/>
<item
name=
"gengmei_flutter_plugin"
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"
/>
</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>
<item
name=
"gengmei_flutter_plugin"
type=
"b2602c69:ProjectViewProjectNode"
/>
<item
name=
"gengmei_flutter_plugin"
type=
"462c0819:PsiDirectoryNode"
/>
<item
name=
"example"
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"
/>
</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"
/>
...
...
@@ -252,8 +217,6 @@
<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>
<item
name=
"gengmei_flutter_plugin"
type=
"b2602c69:ProjectViewProjectNode"
/>
...
...
@@ -282,7 +245,9 @@
<select
/>
</subPane>
</pane>
<pane
id=
"Scope"
/>
<pane
id=
"AndroidView"
/>
<pane
id=
"PackagesPane"
/>
</panes>
</component>
<component
name=
"PropertiesComponent"
>
...
...
@@ -328,7 +293,8 @@
<servers
/>
</component>
<component
name=
"ToolWindowManager"
>
<frame
x=
"492"
y=
"-1050"
width=
"1440"
height=
"812"
extended-state=
"0"
/>
<frame
x=
"494"
y=
"-886"
width=
"1440"
height=
"812"
extended-state=
"0"
/>
<editor
active=
"true"
/>
<layout>
<window_info
content_ui=
"combo"
id=
"Project"
order=
"0"
visible=
"true"
weight=
"0.1695279"
/>
<window_info
id=
"Captures"
order=
"1"
side_tool=
"true"
/>
...
...
@@ -340,12 +306,12 @@
<window_info
id=
"Capture Tool"
order=
"7"
/>
<window_info
id=
"Favorites"
order=
"8"
side_tool=
"true"
/>
<window_info
anchor=
"bottom"
id=
"Dart Analysis"
order=
"0"
weight=
"0.32963988"
/>
<window_info
a
nchor=
"bottom"
id=
"Run"
order=
"1
"
weight=
"0.42222223"
/>
<window_info
a
ctive=
"true"
anchor=
"bottom"
id=
"Run"
order=
"1"
visible=
"true
"
weight=
"0.42222223"
/>
<window_info
anchor=
"bottom"
id=
"TODO"
order=
"2"
/>
<window_info
anchor=
"bottom"
id=
"Android Profiler"
order=
"3"
show_stripe_button=
"false"
/>
<window_info
anchor=
"bottom"
id=
"Logcat"
order=
"4"
weight=
"0.6425591"
/>
<window_info
anchor=
"bottom"
id=
"Debug"
order=
"5"
/>
<window_info
a
ctive=
"true"
anchor=
"bottom"
id=
"Terminal"
order=
"6"
visible=
"true"
weight=
"0.325
"
/>
<window_info
a
nchor=
"bottom"
id=
"Terminal"
order=
"6"
weight=
"0.31666666
"
/>
<window_info
anchor=
"bottom"
id=
"Event Log"
order=
"7"
side_tool=
"true"
/>
<window_info
anchor=
"bottom"
id=
"Flutter Performance"
order=
"8"
side_tool=
"true"
/>
<window_info
anchor=
"bottom"
id=
"Version Control"
order=
"9"
/>
...
...
@@ -514,101 +480,101 @@
<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
"
>
<entry
file=
"file://$PROJECT_DIR$/
example/lib/AlbumModel/repository/AlbumRepository.dart
"
>
<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
relative-caret-position=
"396"
>
<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://$PROJECT_DIR$/
ios/Classes/GengmeiFlutterPlugin.m
"
>
<entry
file=
"file://$PROJECT_DIR$/
example/lib/AlbumModel/page/album/AlbumPage.dart
"
>
<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
relative-caret-position=
"484"
>
<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$/android/src/main/java/com/example/gengmei_flutter_plugin/ImagePlugin/repository/ImageRespository.kt"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"1
144
"
>
<state
relative-caret-position=
"1
276
"
>
<caret
line=
"78"
column=
"45"
selection-start-line=
"78"
selection-start-column=
"45"
selection-end-line=
"78"
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
"
>
<state
relative-caret-position=
"
88
"
>
<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
"
>
<state
relative-caret-position=
"
1606
"
>
<caret
line=
"81"
column=
"9"
selection-start-line=
"81"
selection-start-column=
"9"
selection-end-line=
"81"
selection-end-column=
"9"
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/lib/S
haredPlugi
n.dart"
>
<entry
file=
"file://$PROJECT_DIR$/lib/S
canImagePlug
n.dart"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
1467
"
>
<caret
line=
"7
6"
column=
"75"
selection-start-line=
"76"
selection-start-column=
"75"
selection-end-line=
"76"
selection-end-column=
"75
"
/>
<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$/
example/lib/ma
in.dart"
>
<entry
file=
"file://$PROJECT_DIR$/
lib/gengmei_flutter_plug
in.dart"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"2
70
"
>
<caret
line=
"1
34"
column=
"46"
selection-start-line=
"134"
selection-start-column=
"46"
selection-end-line=
"134"
selection-end-column=
"46
"
/>
<state
relative-caret-position=
"2
64
"
>
<caret
line=
"1
8"
column=
"37"
selection-start-line=
"18"
selection-start-column=
"37"
selection-end-line=
"18"
selection-end-column=
"37
"
/>
<folding>
<element
signature=
"e#0#
17
#0"
expanded=
"true"
/>
<element
signature=
"e#0#
20
#0"
expanded=
"true"
/>
</folding>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/
example/lib/AlbumModel/page/album/AlbumPage
.dart"
>
<entry
file=
"file://$PROJECT_DIR$/
lib/SharedPlugin
.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
relative-caret-position=
"1606"
>
<caret
line=
"76"
column=
"75"
selection-start-line=
"76"
selection-start-column=
"75"
selection-end-line=
"76"
selection-end-column=
"75"
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/
lib/ScanImagePlugn
.dart"
>
<entry
file=
"file://$PROJECT_DIR$/
example/lib/AlbumModel/page/album/AlbumModel
.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
relative-caret-position=
"160"
>
<caret
line=
"101"
column=
"38"
selection-start-line=
"101"
selection-start-column=
"38"
selection-end-line=
"101"
selection-end-column=
"38"
/>
<folding>
<element
signature=
"e#46#66#0"
expanded=
"true"
/>
</folding>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/
lib/gengmei_flutter_plugin.dart
"
>
<entry
file=
"file://$PROJECT_DIR$/
ios/Classes/GengmeiFlutterPlugin.m
"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"160"
>
<caret
line=
"18"
column=
"37"
selection-start-line=
"18"
selection-start-column=
"37"
selection-end-line=
"18"
selection-end-column=
"37"
/>
<folding>
<element
signature=
"e#0#20#0"
expanded=
"true"
/>
</folding>
<state
relative-caret-position=
"-511"
>
<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$/
example/lib/AlbumModel/repository/AlbumRepository.dart
"
>
<entry
file=
"file://$PROJECT_DIR$/
ios/Classes/GengmeiFlutterPlugin.h
"
>
<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
relative-caret-position=
"88"
>
<caret
line=
"4"
selection-start-line=
"4"
selection-end-line=
"4"
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/example/lib/
AlbumModel/page/album/AlbumModel
.dart"
>
<entry
file=
"file://$PROJECT_DIR$/example/lib/
main
.dart"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
160
"
>
<caret
line=
"1
01"
column=
"38"
selection-start-line=
"101"
selection-start-column=
"38"
selection-end-line=
"101"
selection-end-column=
"38
"
/>
<state
relative-caret-position=
"
274
"
>
<caret
line=
"1
48"
column=
"35"
selection-start-line=
"148"
selection-start-column=
"35"
selection-end-line=
"148"
selection-end-column=
"35
"
/>
<folding>
<element
signature=
"e#
46#66
#0"
expanded=
"true"
/>
<element
signature=
"e#
0#17
#0"
expanded=
"true"
/>
</folding>
</state>
</provider>
...
...
example/lib/main.dart
View file @
a67a1ed3
...
...
@@ -123,6 +123,8 @@ class HOME extends StatefulWidget {
}
class
HOMESTATE
extends
State
<
HOME
>
{
String
imagePath
;
@override
Widget
build
(
BuildContext
context
)
{
// TODO: implement build
...
...
@@ -132,10 +134,21 @@ class HOMESTATE extends State<HOME> {
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
AlbumPage
(
false
,
10
,
null
)));
builder:
(
context
)
=>
AlbumPage
(
false
,
10
,
null
)))
.
then
((
value
)
{
setState
(()
{
imagePath
=
value
;
});
}).
catchError
((
error
)
{
print
(
error
);
});
},
child:
Center
(
child:
Text
(
"wwwwwwww"
),
child:
Container
(
width:
200
,
height:
200
,
color:
Colors
.
yellow
,
child:
imagePath
==
null
?
Text
(
"www"
)
:
Image
.
file
(
File
(
imagePath
)),
)));
}
}
ios/Classes/GengmeiFlutterPlugin.m
View file @
a67a1ed3
...
...
@@ -3,13 +3,13 @@
#import <Photos/Photos.h>
#import "Image/AlbumItem.h"
#import "ResultManager.h"
#import <ImageIO/ImageIO.h>
@interface
GengmeiFlutterPlugin
()
<
UIActionSheetDelegate
,
UIImagePickerControllerDelegate
,
UINavigationControllerDelegate
,
FlutterStreamHandler
>
//一定要声明这三个协议,缺一不可
//@property(nonatomic)FlutterResult result;
@property
(
atomic
)
int
needSize
;
@property
(
non
atomic
)
int
nowSize
;
@property
(
atomic
)
int
nowSize
;
@property
(
atomic
)
int
copySize
;
@property
(
nonatomic
)
int
tempSize
;
@property
(
nonatomic
)
long
resultKey
;
@property
(
nonatomic
)
long
nativeCameraKey
;
@property
(
strong
,
atomic
)
NSMutableDictionary
<
NSString
*
,
NSMutableArray
<
NSMutableDictionary
<
NSString
*
,
NSObject
*>*>*>*
finalMap
;
...
...
@@ -385,16 +385,32 @@ FlutterEventSink _eventSink;
imageRequestOption
.
synchronous
=
NO
;
int
picWidth
=
[
assets
pixelWidth
];
int
picHeight
=
[
assets
pixelHeight
];
float
tempScareSize
=
320
.
0
/
picWidth
;
float
tempScareSize
=
1
;
if
(
picWidth
>
picHeight
){
if
(
picWidth
>
320
.
0
)
{
tempScareSize
=
320
.
0
/
picWidth
;
}
}
else
{
if
(
picHeight
>
320
.
0
)
{
tempScareSize
=
320
.
0
/
picHeight
;
}
}
CGSize
temp
=
CGSizeMake
(
picWidth
*
tempScareSize
,
picHeight
*
tempScareSize
);
imageRequestOption
.
networkAccessAllowed
=
YES
;
imageRequestOption
.
deliveryMode
=
PHImageRequestOptionsDeliveryModeFastFormat
;
imageRequestOption
.
deliveryMode
=
PHImageRequestOptionsDeliveryModeHighQualityFormat
;
//PHImageRequestOptionsDeliveryModeHighQualityFormat。//PHImageRequestOptionsDeliveryModeFastFormat
// imageRequestOption.deliveryMode=PHImageRequestOptionsDeliveryModeFastFormat;
imageRequestOption
.
resizeMode
=
PHImageRequestOptionsResizeModeFast
;
imageRequestOption
.
version
=
PHImageRequestOptionsVersionUnadjusted
;
//PHImageManagerMaximumSize
[[
PHImageManager
defaultManager
]
requestImageForAsset
:
assets
targetSize
:
temp
contentMode
:
PHImageContentModeDefault
options
:
imageRequestOption
resultHandler
:^
(
UIImage
*
_Nullable
result
,
NSDictionary
*
_Nullable
info
)
{
[
UIImageJPEGRepresentation
(
result
,
1
)
writeToFile
:
tmpPath
atomically
:
YES
];
@autoreleasepool
{
NSData
*
data
=
UIImageJPEGRepresentation
(
result
,
0
.
7
)
;
[
data
writeToFile
:
tmpPath
atomically
:
YES
];
data
=
nil
;
result
=
nil
;
}
// [UIImageJPEGRepresentation(result,1) writeToFile:tmpPath atomically:YES];
// [UIImageJPEGRepresentation([self image:result byScalingToSize:temp],0.8) writeToFile:realPath atomically:YES ];
NSMutableDictionary
*
queryItemDict
=
[
NSMutableDictionary
dictionary
];
[
queryItemDict
setObject
:
tmpPath
forKey
:
@"path"
];
...
...
@@ -408,35 +424,10 @@ FlutterEventSink _eventSink;
[
self
.
finalMap
[
docName
]
addObject
:
queryItemDict
];
}
NSLog
(
@"SCARE SIZEEE %d %d "
,
self
.
nowSize
,
self
.
needSize
);
result
=
nil
;
if
(
self
.
nowSize
==
self
.
needSize
)
{
[
self
resultImgs
:
resultId
];
}
// if ([[NSFileManager defaultManager] createFileAtPath:realPath contents:data attributes:nil]) {
// if ([[NSFileManager defaultManager] createFileAtPath:tmpPath contents:scareData attributes:nil]) {
// NSLog(@"result %@",tmpPath);
// self.nowSize++;
// NSMutableDictionary* queryItemDict = [NSMutableDictionary dictionary];
// [queryItemDict setObject:tmpPath forKey:@"path"];
// [queryItemDict setObject:realPath forKey:@"realPath"];
// NSMutableArray * arr=self.finalMap[docName];
// if (arr==nil) {
// self.finalMap[docName]=[NSMutableArray array];
// [self.finalMap[docName] addObject:queryItemDict];
// }else{
// [self.finalMap[docName] addObject:queryItemDict];
// }
// NSLog(@"SIZEEE %d %d ",self.nowSize,self.needSize);
// if (self.nowSize==self.needSize) {
// [self resultImgs:resultId];
// }
// }else{
// NSLog(@"ERRORRRR ");
// self.needSize--;
// }
// } else {
// NSLog(@"ERRORRRR ");
// self.needSize--;
// }
}];
}
}
...
...
@@ -467,6 +458,7 @@ FlutterEventSink _eventSink;
__block
NSString
*
tmpPath
=
[
cacheDirectory
stringByAppendingPathComponent
:
imgName
];
if
([
fileManager
fileExistsAtPath
:
realPath
]
==
YES
){
self
.
nowSize
++
;
NSLog
(
@"!!!REAL IS EXIE!! %@"
,
realPath
);
NSMutableArray
<
NSMutableDictionary
<
NSString
*
,
NSObject
*>*>*
array
=
self
.
finalMap
[
docName
];
for
(
int
x
=
0
;
x
<
[
array
count
];
x
++
)
{
NSMutableDictionary
<
NSString
*
,
NSObject
*>*
map
=
[
array
objectAtIndex
:
x
];
...
...
@@ -484,23 +476,31 @@ FlutterEventSink _eventSink;
}
else
{
NSLog
(
@"file NOT EXIT !! "
);
PHImageRequestOptions
*
imageRequestOption
=
[[
PHImageRequestOptions
alloc
]
init
];
imageRequestOption
.
synchronous
=
YES
;
imageRequestOption
.
synchronous
=
NO
;
int
picWidth
=
[
assets
pixelWidth
];
int
picHeight
=
[
assets
pixelHeight
];
float
tempScareSize
;
if
(
picWidth
>
1080
.
0
){
tempScareSize
=
1080
.
0
/
picWidth
;
float
tempScareSize
=
1
;
float
limit
=
2160
.
0
;
if
(
picWidth
>
picHeight
){
if
(
picWidth
>
limit
)
{
tempScareSize
=
limit
/
picWidth
;
}
}
else
{
tempScareSize
=
1
;
if
(
picHeight
>
limit
)
{
tempScareSize
=
limit
/
picHeight
;
}
}
NSLog
(
@"SCARE SZIE %d %d %f %f %f"
,
picWidth
,
picHeight
,
tempScareSize
,
picWidth
*
tempScareSize
,
picHeight
*
tempScareSize
);
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
];
[[
PHImageManager
defaultManager
]
requestImageDataForAsset
:
assets
options
:
imageRequestOption
resultHandler
:^
(
NSData
*
_Nullable
imageData
,
NSString
*
_Nullable
dataUTI
,
UIImageOrientation
orientation
,
NSDictionary
*
_Nullable
info
)
{
// UIImage *image = [UIImage imageWithData:imageData];
[
imageData
writeToFile
:
realPath
atomically
:
YES
];
//获取照片 image
self
.
nowSize
++
;
self
.
copySize
++
;
NSMutableArray
<
NSMutableDictionary
<
NSString
*
,
NSObject
*>*>*
array
=
self
.
finalMap
[
docName
];
...
...
@@ -513,10 +513,11 @@ FlutterEventSink _eventSink;
}
}
NSLog
(
@"SIZEEE %d %d %d"
,
self
.
nowSize
,
self
.
needSize
,
self
.
copySize
);
// result=nil;
if
(
self
.
nowSize
==
self
.
needSize
)
{
[
self
upImgs
];
self
.
execdTask
=
true
;
}
else
if
(
self
.
copySize
%
15
==
0
){
}
else
if
(
self
.
copySize
%
30
==
0
){
NSLog
(
@"UPPP!!"
);
[
self
upImgs
];
}
...
...
@@ -526,6 +527,21 @@ FlutterEventSink _eventSink;
}
}
-
(
void
)
writeImage
:
(
UIImage
*
)
image
dest
:
(
NSString
*
)
path
{
@autoreleasepool
{
CFURLRef
url
=
(
__bridge
CFURLRef
)[
NSURL
fileURLWithPath
:
path
];
CGImageDestinationRef
des
=
CGImageDestinationCreateWithURL
(
url
,
CFSTR
(
"public.png"
),
1
,
NULL
);
if
(
!
des
){
NSLog
(
@"wrong"
);
return
;
}
CGImageDestinationAddImage
(
des
,
image
.
CGImage
,
nil
);
if
(
!
CGImageDestinationFinalize
(
des
)){
NSLog
(
@"wrong222"
);
}
CFRelease
(
des
);
}
}
...
...
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