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
65d6fd04
Commit
65d6fd04
authored
Oct 17, 2019
by
林生雨
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
commit
parent
17fcda9a
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
287 additions
and
212 deletions
+287
-212
misc.xml
.idea/misc.xml
+1
-0
workspace.xml
.idea/workspace.xml
+134
-119
GengmeiFlutterPlugin.kt
...om/example/gengmei_flutter_plugin/GengmeiFlutterPlugin.kt
+17
-2
ImageScanner.kt
...utter_plugin/ImagePlugin/repository/local/ImageScanner.kt
+1
-1
Engine.kt
...mei_flutter_plugin/ImagePlugin/repository/luban/Engine.kt
+1
-1
ResultManager.kt
...om/example/gengmei_flutter_plugin/result/ResultManager.kt
+0
-3
SharedManager.kt
.../gengmei_flutter_plugin/sharedPrefernces/SharedManager.kt
+12
-5
AlbumModel.dart
example/lib/AlbumModel/page/album/AlbumModel.dart
+17
-17
AlbumPage.dart
example/lib/AlbumModel/page/album/AlbumPage.dart
+1
-4
pubspec.lock
example/pubspec.lock
+21
-21
gengmei_flutter_plugin.iml
gengmei_flutter_plugin.iml
+3
-0
GengmeiFlutterPlugin.m
ios/Classes/GengmeiFlutterPlugin.m
+44
-18
AlbumItem.m
ios/Classes/Image/AlbumItem.m
+7
-5
ScanImagePlugn.dart
lib/ScanImagePlugn.dart
+1
-0
SharedPlugin.dart
lib/SharedPlugin.dart
+7
-1
gengmei_flutter_plugin.dart
lib/gengmei_flutter_plugin.dart
+20
-15
No files found.
.idea/misc.xml
View file @
65d6fd04
<?xml version="1.0" encoding="UTF-8"?>
<project
version=
"4"
>
<component
name=
"ProjectRootManager"
version=
"2"
project-jdk-name=
"Android API 29 Platform"
project-jdk-type=
"Android SDK"
/>
<component
name=
"ProjectType"
>
<option
name=
"id"
value=
"io.flutter"
/>
</component>
...
...
.idea/workspace.xml
View file @
65d6fd04
...
...
@@ -6,11 +6,30 @@
</component>
<component
name=
"ChangeListManager"
>
<list
default=
"true"
id=
"5be6bbb5-7d6e-4540-a24f-d2b3bf78b3ba"
name=
"Default Changelist"
comment=
""
>
<change
beforePath=
"$PROJECT_DIR$/.idea/misc.xml"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/.idea/misc.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/src/main/java/com/example/gengmei_flutter_plugin/GengmeiFlutterPlugin.kt"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/android/src/main/java/com/example/gengmei_flutter_plugin/GengmeiFlutterPlugin.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/luban/Engine.kt"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/android/src/main/java/com/example/gengmei_flutter_plugin/ImagePlugin/repository/luban/Engine.kt"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/android/src/main/java/com/example/gengmei_flutter_plugin/result/ResultManager.kt"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/android/src/main/java/com/example/gengmei_flutter_plugin/result/ResultManager.kt"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/android/src/main/java/com/example/gengmei_flutter_plugin/sharedPrefernces/SharedManager.kt"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/android/src/main/java/com/example/gengmei_flutter_plugin/sharedPrefernces/SharedManager.kt"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/example/ios/.symlinks/plugins/gengmei_flutter_plugin/.idea/misc.xml"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/example/ios/.symlinks/plugins/gengmei_flutter_plugin/.idea/misc.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/src/main/java/com/example/gengmei_flutter_plugin/ImagePlugin/repository/local/ImageScanner.kt"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/example/ios/.symlinks/plugins/gengmei_flutter_plugin/android/src/main/java/com/example/gengmei_flutter_plugin/ImagePlugin/repository/local/ImageScanner.kt"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/example/ios/.symlinks/plugins/gengmei_flutter_plugin/android/src/main/java/com/example/gengmei_flutter_plugin/ImagePlugin/repository/luban/Engine.kt"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/example/ios/.symlinks/plugins/gengmei_flutter_plugin/android/src/main/java/com/example/gengmei_flutter_plugin/ImagePlugin/repository/luban/Engine.kt"
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/example/lib/AlbumModel/page/album/AlbumPage.dart"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/example/ios/.symlinks/plugins/gengmei_flutter_plugin/example/lib/AlbumModel/page/album/AlbumPage.dart"
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/ios/.symlinks/plugins/gengmei_flutter_plugin/ios/Classes/Image/AlbumItem.m"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/example/ios/.symlinks/plugins/gengmei_flutter_plugin/ios/Classes/Image/AlbumItem.m"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/example/ios/.symlinks/plugins/gengmei_flutter_plugin/lib/ScanImagePlugn.dart"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/example/ios/.symlinks/plugins/gengmei_flutter_plugin/lib/ScanImagePlugn.dart"
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$/example/lib/AlbumModel/page/album/AlbumPage.dart"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/example/lib/AlbumModel/page/album/AlbumPage.dart"
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"
/>
<change
beforePath=
"$PROJECT_DIR$/ios/Classes/Image/AlbumItem.m"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/ios/Classes/Image/AlbumItem.m"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/lib/ScanImagePlugn.dart"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/lib/ScanImagePlugn.dart"
afterDir=
"false"
/>
</list>
<ignored
path=
"$PROJECT_DIR$/.dart_tool/"
/>
<ignored
path=
"$PROJECT_DIR$/.idea/"
/>
...
...
@@ -30,23 +49,11 @@
<component
name=
"ExecutionTargetManager"
SELECTED_TARGET=
"AKC0218316000622"
/>
<component
name=
"FileEditorManager"
>
<leaf
SIDE_TABS_SIZE_LIMIT_KEY=
"300"
>
<file
pinned=
"false"
current-in-tab=
"true"
>
<entry
file=
"file://$PROJECT_DIR$/example/lib/AlbumModel/page/album/AlbumModel.dart"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"136"
>
<caret
line=
"73"
column=
"9"
selection-start-line=
"73"
selection-start-column=
"9"
selection-end-line=
"73"
selection-end-column=
"9"
/>
<folding>
<element
signature=
"e#46#66#0"
expanded=
"true"
/>
</folding>
</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$/android/src/main/java/com/example/gengmei_flutter_plugin/
sharedPrefernces/SharedManager.kt
"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
8
8"
>
<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=
"
206
8"
>
<caret
line=
"1
01"
column=
"21"
selection-start-line=
"101"
selection-start-column=
"8"
selection-end-line=
"101"
selection-end-column=
"21
"
/>
</state>
</provider>
</entry>
...
...
@@ -54,8 +61,8 @@
<file
pinned=
"false"
current-in-tab=
"false"
>
<entry
file=
"file://$PROJECT_DIR$/example/lib/AlbumModel/page/album/AlbumPage.dart"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
173
"
>
<caret
line=
"1
80"
column=
"47"
selection-start-line=
"180"
selection-start-column=
"47"
selection-end-line=
"180"
selection-end-column=
"4
7"
/>
<state
relative-caret-position=
"
2200
"
>
<caret
line=
"1
09"
column=
"17"
selection-start-line=
"109"
selection-start-column=
"17"
selection-end-line=
"109"
selection-end-column=
"1
7"
/>
<folding>
<element
signature=
"e#45#62#0"
expanded=
"true"
/>
</folding>
...
...
@@ -64,33 +71,44 @@
</entry>
</file>
<file
pinned=
"false"
current-in-tab=
"false"
>
<entry
file=
"file://$PROJECT_DIR$/ios/Classes/Image/ResultManager.h"
>
<entry
file=
"file://$PROJECT_DIR$/example/lib/AlbumModel/bean/DirBean.dart"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
/>
</entry>
</file>
<file
pinned=
"false"
current-in-tab=
"false"
>
<entry
file=
"file://$PROJECT_DIR$/example/lib/AlbumModel/page/temp.dart"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
/>
</entry>
</file>
<file
pinned=
"false"
current-in-tab=
"false"
>
<entry
file=
"file://$
PROJECT_DIR$/ios/Classes/GengmeiFlutterPlugin.h
"
>
<entry
file=
"file://$
USER_HOME$/Downloads/flutter/packages/flutter/lib/src/material/icons.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=
"
44440
"
>
<caret
line=
"
2022"
column=
"24"
selection-start-line=
"2022"
selection-start-column=
"24"
selection-end-line=
"2022"
selection-end-column=
"2
4"
/>
</state>
</provider>
</entry>
</file>
<file
pinned=
"false"
current-in-tab=
"
fals
e"
>
<entry
file=
"file://$PROJECT_DIR$/
ios/Classes/GengmeiFlutterPlugin.m
"
>
<file
pinned=
"false"
current-in-tab=
"
tru
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=
"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=
"47"
>
<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>
</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/Engine.k
t"
>
<entry
file=
"file://$PROJECT_DIR$/
example/lib/AlbumModel/repository/AlbumRepository.dar
t"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<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
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>
...
...
@@ -99,7 +117,7 @@
<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=
"5
0"
selection-start-line=
"7"
selection-start-column=
"50"
selection-end-line=
"7"
selection-end-column=
"50
"
/>
<caret
line=
"7"
column=
"5
7"
selection-start-line=
"7"
selection-start-column=
"57"
selection-end-line=
"7"
selection-end-column=
"57
"
/>
</state>
</provider>
</entry>
...
...
@@ -107,8 +125,8 @@
<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=
"2
5
"
>
<caret
line=
"
8"
column=
"26"
selection-start-line=
"8"
selection-start-column=
"6"
selection-end-line=
"8"
selection-end-column=
"26
"
/>
<state
relative-caret-position=
"2
42
"
>
<caret
line=
"
17"
column=
"61"
selection-start-line=
"17"
selection-start-column=
"50"
selection-end-line=
"17"
selection-end-column=
"61
"
/>
<folding>
<element
signature=
"e#0#20#0"
expanded=
"true"
/>
</folding>
...
...
@@ -120,7 +138,7 @@
<entry
file=
"file://$PROJECT_DIR$/lib/SharedPlugin.dart"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<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
"
/>
<caret
line=
"76"
column=
"
43"
selection-start-line=
"76"
selection-start-column=
"22"
selection-end-line=
"76"
selection-end-column=
"43
"
/>
</state>
</provider>
</entry>
...
...
@@ -138,7 +156,6 @@
<findStrings>
<find>
permissions
</find>
<find>
_rawPath
</find>
<find>
phoneImages
</find>
<find>
VALUE
</find>
<find>
onTap
</find>
<find>
albumLive
</find>
...
...
@@ -147,6 +164,10 @@
<find>
getStringList
</find>
<find>
init!!!
</find>
<find>
path
</find>
<find>
GET_STRINGLIST_SHARED
</find>
<find>
Icons
</find>
<find>
dispo
</find>
<find>
phoneImages
</find>
</findStrings>
</component>
<component
name=
"Git.Settings"
>
...
...
@@ -161,7 +182,6 @@
<option
value=
"$PROJECT_DIR$/example/lib/AlbumModel/AlbumRouter.dart"
/>
<option
value=
"$PROJECT_DIR$/example/lib/Annotations/Generator/RouterCenterGenerator.dart"
/>
<option
value=
"$PROJECT_DIR$/example/pubspec.yaml"
/>
<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$/example/lib/AlbumModel/repository/AlbumRepository.dart"
/>
<option
value=
"$PROJECT_DIR$/lib/SharedPlugin.dart"
/>
...
...
@@ -174,15 +194,15 @@
<option
value=
"$PROJECT_DIR$/example/lib/main.dart"
/>
<option
value=
"$PROJECT_DIR$/lib/gengmei_flutter_plugin.dart"
/>
<option
value=
"$PROJECT_DIR$/example/lib/AlbumModel/page/album/AlbumPage.dart"
/>
<option
value=
"$PROJECT_DIR$/lib/ScanImagePlugn.dart"
/>
<option
value=
"$PROJECT_DIR$/example/lib/AlbumModel/page/album/AlbumModel.dart"
/>
</list>
</option>
</component>
<component
name=
"ProjectFrameBounds"
>
<option
name=
"x"
value=
"439"
/>
<option
name=
"y"
value=
"-904"
/>
<component
name=
"ProjectFrameBounds"
extendedState=
"6"
>
<option
name=
"y"
value=
"23"
/>
<option
name=
"width"
value=
"1440"
/>
<option
name=
"height"
value=
"81
2
"
/>
<option
name=
"height"
value=
"81
1
"
/>
</component>
<component
name=
"ProjectLevelVcsManager"
settingsEditedManually=
"true"
/>
<component
name=
"ProjectView"
>
...
...
@@ -191,7 +211,7 @@
</navigator>
<panes>
<pane
id=
"Scope"
/>
<pane
id=
"
AndroidView
"
/>
<pane
id=
"
PackagesPane
"
/>
<pane
id=
"ProjectPane"
>
<subPane>
<expand>
...
...
@@ -242,24 +262,6 @@
<item
name=
"page"
type=
"462c0819:PsiDirectoryNode"
/>
<item
name=
"album"
type=
"462c0819:PsiDirectoryNode"
/>
</path>
<path>
<item
name=
"gengmei_flutter_plugin"
type=
"b2602c69:ProjectViewProjectNode"
/>
<item
name=
"gengmei_flutter_plugin"
type=
"462c0819:PsiDirectoryNode"
/>
<item
name=
"ios"
type=
"462c0819:PsiDirectoryNode"
/>
</path>
<path>
<item
name=
"gengmei_flutter_plugin"
type=
"b2602c69:ProjectViewProjectNode"
/>
<item
name=
"gengmei_flutter_plugin"
type=
"462c0819:PsiDirectoryNode"
/>
<item
name=
"ios"
type=
"462c0819:PsiDirectoryNode"
/>
<item
name=
"Classes"
type=
"462c0819:PsiDirectoryNode"
/>
</path>
<path>
<item
name=
"gengmei_flutter_plugin"
type=
"b2602c69:ProjectViewProjectNode"
/>
<item
name=
"gengmei_flutter_plugin"
type=
"462c0819:PsiDirectoryNode"
/>
<item
name=
"ios"
type=
"462c0819:PsiDirectoryNode"
/>
<item
name=
"Classes"
type=
"462c0819:PsiDirectoryNode"
/>
<item
name=
"Image"
type=
"462c0819:PsiDirectoryNode"
/>
</path>
<path>
<item
name=
"gengmei_flutter_plugin"
type=
"b2602c69:ProjectViewProjectNode"
/>
<item
name=
"gengmei_flutter_plugin"
type=
"462c0819:PsiDirectoryNode"
/>
...
...
@@ -269,7 +271,7 @@
<select
/>
</subPane>
</pane>
<pane
id=
"
PackagesPane
"
/>
<pane
id=
"
AndroidView
"
/>
</panes>
</component>
<component
name=
"PropertiesComponent"
>
...
...
@@ -315,7 +317,8 @@
<servers
/>
</component>
<component
name=
"ToolWindowManager"
>
<frame
x=
"439"
y=
"-904"
width=
"1440"
height=
"812"
extended-state=
"0"
/>
<frame
x=
"0"
y=
"23"
width=
"1440"
height=
"811"
extended-state=
"6"
/>
<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"
/>
...
...
@@ -327,12 +330,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
anchor=
"bottom"
id=
"Run"
order=
"1"
weight=
"0.
42222223
"
/>
<window_info
anchor=
"bottom"
id=
"Run"
order=
"1"
weight=
"0.
2058011
"
/>
<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=
"Logcat"
order=
"4"
weight=
"0.
33977902
"
/>
<window_info
anchor=
"bottom"
id=
"Debug"
order=
"5"
/>
<window_info
active=
"true"
anchor=
"bottom"
id=
"Terminal"
order=
"6"
visible=
"true"
weight=
"0.
7083333
"
/>
<window_info
active=
"true"
anchor=
"bottom"
id=
"Terminal"
order=
"6"
visible=
"true"
weight=
"0.
6536857
"
/>
<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"
/>
...
...
@@ -348,18 +351,6 @@
</layout>
</component>
<component
name=
"editorHistoryManager"
>
<entry
file=
"file://$PROJECT_DIR$/LICENSE"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
/>
</entry>
<entry
file=
"file://$PROJECT_DIR$/example/.gitignore"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
/>
</entry>
<entry
file=
"file://$PROJECT_DIR$/example/.packages"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
/>
</entry>
<entry
file=
"file://$PROJECT_DIR$/example/.metadata"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
/>
</entry>
<entry
file=
"file://$PROJECT_DIR$/test/gengmei_flutter_plugin_test.dart"
/>
<entry
file=
"file://$USER_HOME$/Downloads/flutter/packages/flutter/lib/src/services/message_codecs.dart"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
...
...
@@ -405,13 +396,6 @@
<entry
file=
"file://$PROJECT_DIR$/pubspec.lock"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
/>
</entry>
<entry
file=
"file://$USER_HOME$/Downloads/flutter/packages/flutter/lib/src/services/platform_channel.dart"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"6534"
>
<caret
line=
"306"
column=
"12"
selection-start-line=
"306"
selection-start-column=
"12"
selection-end-line=
"306"
selection-end-column=
"12"
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/example/pubspec.yaml"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"330"
>
...
...
@@ -422,9 +406,6 @@
<entry
file=
"file://$PROJECT_DIR$/example/lib/AlbumModel/LiveData.dart"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
/>
</entry>
<entry
file=
"file://$PROJECT_DIR$/example/lib/AlbumModel/bean/DirBean.dart"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
/>
</entry>
<entry
file=
"file://$PROJECT_DIR$/android/src/main/kotlin/com/example/gengmei_flutter_plugin/sharedPrefernces/SharedManager.kt"
/>
<entry
file=
"file://$PROJECT_DIR$/lib/A.dart"
/>
<entry
file=
"file://$PROJECT_DIR$/android/src/main/java/com/example/gengmei_flutter_plugin/a"
/>
...
...
@@ -485,29 +466,12 @@
<entry
file=
"file://$PROJECT_DIR$/ios/Classes/Image/AlbumItem.m"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
/>
</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"
>
<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$/example/lib/AlbumModel/repository/AlbumRepository.dart"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<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$/example/lib/main.dart"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"3278"
>
...
...
@@ -539,6 +503,23 @@
</state>
</provider>
</entry>
<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"
>
<state
relative-caret-position=
"814"
>
<caret
line=
"39"
column=
"13"
selection-start-line=
"39"
selection-start-column=
"4"
selection-end-line=
"39"
selection-end-column=
"13"
/>
</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=
"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"
>
...
...
@@ -549,51 +530,85 @@
<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=
"1606"
>
<caret
line=
"8
1"
column=
"9"
selection-start-line=
"81"
selection-start-column=
"9"
selection-end-line=
"81
"
selection-end-column=
"9"
/>
<caret
line=
"8
2"
column=
"9"
selection-start-line=
"82"
selection-start-column=
"9"
selection-end-line=
"82
"
selection-end-column=
"9"
/>
</state>
</provider>
</entry>
<entry
file=
"file://$
PROJECT_DIR$/lib/ScanImagePlugn
.dart"
>
<entry
file=
"file://$
USER_HOME$/Downloads/flutter/packages/flutter/lib/src/services/platform_channel
.dart"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
8
8"
>
<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=
"
657
8"
>
<caret
line=
"
308"
column=
"15"
selection-start-line=
"308"
selection-start-column=
"15"
selection-end-line=
"308"
selection-end-column=
"15
"
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/
lib/SharedPlugin.dar
t"
>
<entry
file=
"file://$PROJECT_DIR$/
android/src/main/java/com/example/gengmei_flutter_plugin/sharedPrefernces/SharedManager.k
t"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<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
relative-caret-position=
"
2068
"
>
<caret
line=
"
101"
column=
"21"
selection-start-line=
"101"
selection-start-column=
"8"
selection-end-line=
"101"
selection-end-column=
"21
"
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/
lib/gengmei_flutter_plugin
.dart"
>
<entry
file=
"file://$PROJECT_DIR$/
example/lib/AlbumModel/page/album/AlbumPage
.dart"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"2
5
"
>
<caret
line=
"
8"
column=
"26"
selection-start-line=
"8"
selection-start-column=
"6"
selection-end-line=
"8"
selection-end-column=
"26
"
/>
<state
relative-caret-position=
"2
200
"
>
<caret
line=
"
109"
column=
"17"
selection-start-line=
"109"
selection-start-column=
"17"
selection-end-line=
"109"
selection-end-column=
"17
"
/>
<folding>
<element
signature=
"e#
0#20
#0"
expanded=
"true"
/>
<element
signature=
"e#
45#62
#0"
expanded=
"true"
/>
</folding>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/
ios/Classes/Image/ResultManager.h
"
>
<entry
file=
"file://$PROJECT_DIR$/
example/lib/AlbumModel/bean/DirBean.dart
"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
/>
</entry>
<entry
file=
"file://$PROJECT_DIR$/example/lib/AlbumModel/page/album/AlbumPage.dart"
>
<entry
file=
"file://$PROJECT_DIR$/example/lib/AlbumModel/page/temp.dart"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
/>
</entry>
<entry
file=
"file://$USER_HOME$/Downloads/flutter/packages/flutter/lib/src/material/icons.dart"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"44440"
>
<caret
line=
"2022"
column=
"24"
selection-start-line=
"2022"
selection-start-column=
"24"
selection-end-line=
"2022"
selection-end-column=
"24"
/>
</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=
"
173
"
>
<caret
line=
"
180"
column=
"47"
selection-start-line=
"180"
selection-start-column=
"47"
selection-end-line=
"180
"
selection-end-column=
"47"
/>
<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#45#62#0"
expanded=
"true"
/>
<element
signature=
"e#46#106#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=
"57"
selection-start-line=
"7"
selection-start-column=
"57"
selection-end-line=
"7"
selection-end-column=
"57"
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/lib/gengmei_flutter_plugin.dart"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"242"
>
<caret
line=
"17"
column=
"61"
selection-start-line=
"17"
selection-start-column=
"50"
selection-end-line=
"17"
selection-end-column=
"61"
/>
<folding>
<element
signature=
"e#0#20#0"
expanded=
"true"
/>
</folding>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/lib/SharedPlugin.dart"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"1606"
>
<caret
line=
"76"
column=
"43"
selection-start-line=
"76"
selection-start-column=
"22"
selection-end-line=
"76"
selection-end-column=
"43"
/>
</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=
"
136
"
>
<caret
line=
"7
3"
column=
"9"
selection-start-line=
"73"
selection-start-column=
"9"
selection-end-line=
"73"
selection-end-column=
"9
"
/>
<state
relative-caret-position=
"
47
"
>
<caret
line=
"7
0"
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>
...
...
android/src/main/java/com/example/gengmei_flutter_plugin/GengmeiFlutterPlugin.kt
View file @
65d6fd04
...
...
@@ -43,6 +43,7 @@ class GengmeiFlutterPlugin : MethodCallHandler {
private
var
record
:
HashMap
<
String
,
ArrayList
<
HashMap
<
String
,
Any
>>>?
=
null
;
var
nativeImage
:
File
?
=
null
var
isTaskingExectured
:
Boolean
=
false
;
var
quit_page
=
false
;
companion
object
{
const
val
IMAGE_PICKER
=
"scan_image_picker"
...
...
@@ -61,6 +62,8 @@ class GengmeiFlutterPlugin : MethodCallHandler {
const
val
GET_FLOAT_SHARED
=
"GET_FLOAT_SHARED"
const
val
GET_BOOLEAN_SHARED
=
"GET_BOOLEAN_SHARED"
const
val
GET_STRINGLIST_SHARED
=
"GET_STRINGLIST_SHARED"
const
val
CLEAR_SHARE
=
"CLEAR_SHARE"
const
val
PREMISSION
=
10090
//相机请求码
private
val
CAMERA_REQUEST_CODE
=
2
...
...
@@ -213,9 +216,19 @@ class GengmeiFlutterPlugin : MethodCallHandler {
ResultManager
.
getInstance
().
resultError
(
result
,
it
.
message
!!
,
it
.
message
!!
);
}).
addTo
(
disposable
)
}
CLEAR_SHARE
->
{
val
result
=
resultKey
;
SharedManager
.
getInstance
(
resign
.
activity
().
applicationContext
).
clear
().
subscribe
({
ResultManager
.
getInstance
().
resultSuccess
(
result
,
it
);
},
{
DebugUtil
.
printStackTrace
(
it
);
ResultManager
.
getInstance
().
resultError
(
result
,
it
.
message
!!
,
it
.
message
!!
)
}).
addTo
(
disposable
)
}
QUIT_PAGE
->
{
disposable
.
dispose
()
disposable
=
CompositeDisposable
()
quit_page
=
true
;
ResultManager
.
getInstance
().
resultSuccess
(
resultKey
,
true
)
}
else
->
result
.
notImplemented
()
...
...
@@ -223,11 +236,13 @@ class GengmeiFlutterPlugin : MethodCallHandler {
}
fun
ScanImage
(
resultKey
:
Long
)
{
quit_page
=
false
;
ImageRespository
.
getInstance
().
scanPhoneImage
(
resign
.
context
().
applicationContext
).
subscribe
(
{
record
=
it
ResultManager
.
getInstance
().
resultSuccess
(
resultKey
,
it
);
if
(!
quit_page
)
{
ResultManager
.
getInstance
().
resultSuccess
(
resultKey
,
it
);
}
if
(
isTaskingExectured
)
{
return
@subscribe
;
}
...
...
android/src/main/java/com/example/gengmei_flutter_plugin/ImagePlugin/repository/local/ImageScanner.kt
View file @
65d6fd04
...
...
@@ -77,7 +77,7 @@ class ImageScanner(var context: Context) : AbsMediaScanner<MediaFile>(context) {
if
(
tempFileJpegExists
)
{
mediaFile
.
path
=
tempFileJpegString
;
}
if
(
size
<
1024
*
512
)
{
if
(
size
<
1024
*
100
)
{
mediaFile
.
path
=
path
}
//
...
...
android/src/main/java/com/example/gengmei_flutter_plugin/ImagePlugin/repository/luban/Engine.kt
View file @
65d6fd04
...
...
@@ -70,7 +70,7 @@ constructor(private val srcImg: InputStreamProvider, private val tagImgPath: Str
if
(
quality
==
100
)
{
options
.
inSampleSize
=
computeSize
()
}
else
{
options
.
inSampleSize
=
(
srcWidth
/
24
0
).
toInt
();
options
.
inSampleSize
=
(
srcWidth
/
16
0
).
toInt
();
}
// Log.e("lsy"," SAMPLE SIZE ${options.inSampleSize} ${srcWidth}")
...
...
android/src/main/java/com/example/gengmei_flutter_plugin/result/ResultManager.kt
View file @
65d6fd04
...
...
@@ -20,12 +20,10 @@ class ResultManager private constructor() {
}
fun
resultSuccess
(
key
:
Long
,
value
:
Any
)
{
Log
.
e
(
"lsy"
,
"KEYYY $key "
)
map
.
get
(
key
)
?.
run
{
this
.
success
(
value
);
}
map
.
remove
(
key
)
Log
.
e
(
"lsy"
,
" ${map.size}"
)
}
fun
resultError
(
key
:
Long
,
message
:
String
,
ob
:
Any
)
{
...
...
@@ -33,7 +31,6 @@ class ResultManager private constructor() {
this
.
error
(
message
,
message
,
ob
)
}
map
.
remove
(
key
)
Log
.
e
(
"lsy"
,
" ${map.size}"
)
}
...
...
android/src/main/java/com/example/gengmei_flutter_plugin/sharedPrefernces/SharedManager.kt
View file @
65d6fd04
...
...
@@ -24,7 +24,7 @@ class SharedManager private constructor(app: Context) {
companion
object
{
const
val
SHARED_PREFERENCES_NAME
=
"FlutterSharedPreferences"
@Volatile
private
var
instance
:
SharedManager
?
=
null
;
private
var
instance
:
SharedManager
?
=
null
;
@JvmStatic
fun
getInstance
(
app
:
Context
):
SharedManager
{
...
...
@@ -78,9 +78,9 @@ class SharedManager private constructor(app: Context) {
fun
getString
(
key
:
String
,
value
:
String
?):
Observable
<
String
?>
{
return
Observable
.
create
(
ObservableOnSubscribe
<
String
>
{
val
string
=
preferences
.
getString
(
key
,
value
)
if
(
string
==
null
)
{
if
(
string
==
null
)
{
it
.
onNext
(
""
)
}
else
{
}
else
{
it
.
onNext
(
string
)
}
}).
subscribeOn
(
Schedulers
.
io
()).
observeOn
(
AndroidSchedulers
.
mainThread
());
...
...
@@ -102,13 +102,19 @@ class SharedManager private constructor(app: Context) {
fun
getStringList
(
key
:
String
,
value
:
Set
<
String
>?):
Observable
<
ArrayList
<
String
>>
{
return
Observable
.
create
(
ObservableOnSubscribe
<
ArrayList
<
String
>>
{
val
stringSet
=
preferences
.
getStringSet
(
key
,
value
)
if
(
stringSet
==
null
)
{
if
(
stringSet
==
null
)
{
throw
RxExpecition
(
"NULL!!"
)
}
val
temp
=
ArrayList
<
String
>()
val
temp
=
ArrayList
<
String
>()
temp
.
addAll
(
stringSet
)
it
.
onNext
(
temp
)
}).
subscribeOn
(
Schedulers
.
io
()).
observeOn
(
AndroidSchedulers
.
mainThread
());
}
fun
clear
():
Observable
<
Boolean
>
{
return
Observable
.
create
(
ObservableOnSubscribe
<
Boolean
>
{
it
.
onNext
(
preferences
.
edit
().
clear
().
commit
());
}).
subscribeOn
(
Schedulers
.
io
()).
observeOn
(
AndroidSchedulers
.
mainThread
());
}
}
\ No newline at end of file
example/lib/AlbumModel/page/album/AlbumModel.dart
View file @
65d6fd04
...
...
@@ -16,7 +16,7 @@ import 'package:gengmei_flutter_plugin_example/AlbumModel/repository/AlbumReposi
const
String
MainDir
=
"IsGengmeiAlbumAllImages"
;
const
String
MainDirExplain
=
"全部相片"
;
class
AlbumModel
{
class
AlbumModel
{
LiveData
<
List
<
ScanImageItem
>>
albumLive
=
LiveData
();
LiveData
<
List
<
DirBean
>>
dirLive
=
LiveData
();
LiveData
<
String
>
titleData
=
LiveData
();
...
...
@@ -58,19 +58,18 @@ class AlbumModel {
var
map
=
(
event
as
Map
);
// var list = map[_nowDirName];
_mainValue
.
forEach
((
k
,
itemList
)
{
for
(
int
i
=
0
;
i
<
itemList
.
length
;
i
++)
{
if
(
map
[
k
]
==
null
||
map
[
k
][
i
]
==
null
)
{
continue
;
}
var
newPath
=
map
[
k
][
i
][
"path"
]
as
String
;
if
((
itemList
[
i
].
path
==
null
||
itemList
[
i
].
path
.
isEmpty
)
&&
newPath
!=
null
)
{
itemList
[
i
].
path
=
newPath
;
}
var
realPath
=
map
[
k
][
i
][
"realPath"
]
as
String
;
if
((
itemList
[
i
].
realPath
==
null
||
itemList
[
i
].
realPath
.
isEmpty
)
&&
realPath
!=
null
)
{
itemList
[
i
].
realPath
=
realPath
;
var
key
=
map
[
k
];
if
(
key
!=
null
)
{
for
(
int
i
=
0
;
i
<
itemList
.
length
;
i
++)
{
if
(
key
[
i
]
==
null
)
{
continue
;
}
if
(
itemList
[
i
].
path
==
null
)
{
itemList
[
i
].
path
=
key
[
i
][
"path"
];
}
if
(
itemList
[
i
].
realPath
==
null
)
{
itemList
[
i
].
realPath
=
key
[
i
][
"realPath"
];
}
}
}
});
...
...
@@ -100,9 +99,9 @@ class AlbumModel {
void
initScanImages
(
BuildContext
context
)
{
// if (isAndroid) {
_listen
=
GengmeiFlutterPlugin
.
phoneImagesEvent
.
receiveBroadcastStream
()
.
listen
(
_onEvent
,
onError:
_onError
);
_listen
=
GengmeiFlutterPlugin
.
phoneImagesEvent
.
receiveBroadcastStream
()
.
listen
(
_onEvent
,
onError:
_onError
);
// }
AlbumRepository
.
getInstance
().
scanPhoneImg
().
listen
((
value
)
{
if
(
value
!=
null
)
{
...
...
@@ -132,6 +131,7 @@ class AlbumModel {
@override
void
dispose
()
{
GengmeiFlutterPlugin
.
quitPage
();
if
(
_listen
!=
null
)
{
_listen
.
cancel
();
}
...
...
example/lib/AlbumModel/page/album/AlbumPage.dart
View file @
65d6fd04
...
...
@@ -179,10 +179,7 @@ class AlbumState extends State<AlbumPage> {
if
(
imgList
.
data
[
newIndex
]
==
null
||
imgList
.
data
[
newIndex
].
path
==
null
||
imgList
.
data
[
newIndex
].
realPath
==
null
)
{
return
Icon
(
Icons
.
photo
,
size:
20
,
);
return
Container
();
}
return
GestureDetector
(
onTap:
()
=>
_model
.
clickItem
(
context
,
newIndex
),
...
...
example/pubspec.lock
View file @
65d6fd04
...
...
@@ -5,35 +5,35 @@ packages:
dependency: transitive
description:
name: async
url: "https://pub.
flutter-io.cn
"
url: "https://pub.
dartlang.org
"
source: hosted
version: "2.2.0"
boolean_selector:
dependency: transitive
description:
name: boolean_selector
url: "https://pub.
flutter-io.cn
"
url: "https://pub.
dartlang.org
"
source: hosted
version: "1.0.4"
charcode:
dependency: transitive
description:
name: charcode
url: "https://pub.
flutter-io.cn
"
url: "https://pub.
dartlang.org
"
source: hosted
version: "1.1.2"
collection:
dependency: transitive
description:
name: collection
url: "https://pub.
flutter-io.cn
"
url: "https://pub.
dartlang.org
"
source: hosted
version: "1.14.11"
cupertino_icons:
dependency: "direct main"
description:
name: cupertino_icons
url: "https://pub.
flutter-io.cn
"
url: "https://pub.
dartlang.org
"
source: hosted
version: "0.1.2"
flutter:
...
...
@@ -52,49 +52,49 @@ packages:
path: ".."
relative: true
source: path
version: "0.0.7
28
"
version: "0.0.7
35
"
matcher:
dependency: transitive
description:
name: matcher
url: "https://pub.
flutter-io.cn
"
url: "https://pub.
dartlang.org
"
source: hosted
version: "0.12.5"
meta:
dependency: transitive
description:
name: meta
url: "https://pub.
flutter-io.cn
"
url: "https://pub.
dartlang.org
"
source: hosted
version: "1.1.6"
path:
dependency: transitive
description:
name: path
url: "https://pub.
flutter-io.cn
"
url: "https://pub.
dartlang.org
"
source: hosted
version: "1.6.2"
pedantic:
dependency: transitive
description:
name: pedantic
url: "https://pub.
flutter-io.cn
"
url: "https://pub.
dartlang.org
"
source: hosted
version: "1.7.0"
quiver:
dependency: transitive
description:
name: quiver
url: "https://pub.
flutter-io.cn
"
url: "https://pub.
dartlang.org
"
source: hosted
version: "2.0.3"
rxdart:
dependency: "direct main"
description:
name: rxdart
url: "https://pub.
flutter-io.cn
"
url: "https://pub.
dartlang.org
"
source: hosted
version: "0.22.
2
"
version: "0.22.
3
"
sky_engine:
dependency: transitive
description: flutter
...
...
@@ -104,56 +104,56 @@ packages:
dependency: transitive
description:
name: source_span
url: "https://pub.
flutter-io.cn
"
url: "https://pub.
dartlang.org
"
source: hosted
version: "1.5.5"
stack_trace:
dependency: transitive
description:
name: stack_trace
url: "https://pub.
flutter-io.cn
"
url: "https://pub.
dartlang.org
"
source: hosted
version: "1.9.3"
stream_channel:
dependency: transitive
description:
name: stream_channel
url: "https://pub.
flutter-io.cn
"
url: "https://pub.
dartlang.org
"
source: hosted
version: "2.0.0"
string_scanner:
dependency: transitive
description:
name: string_scanner
url: "https://pub.
flutter-io.cn
"
url: "https://pub.
dartlang.org
"
source: hosted
version: "1.0.4"
term_glyph:
dependency: transitive
description:
name: term_glyph
url: "https://pub.
flutter-io.cn
"
url: "https://pub.
dartlang.org
"
source: hosted
version: "1.1.0"
test_api:
dependency: transitive
description:
name: test_api
url: "https://pub.
flutter-io.cn
"
url: "https://pub.
dartlang.org
"
source: hosted
version: "0.2.5"
typed_data:
dependency: transitive
description:
name: typed_data
url: "https://pub.
flutter-io.cn
"
url: "https://pub.
dartlang.org
"
source: hosted
version: "1.1.6"
vector_math:
dependency: transitive
description:
name: vector_math
url: "https://pub.
flutter-io.cn
"
url: "https://pub.
dartlang.org
"
source: hosted
version: "2.0.8"
sdks:
...
...
gengmei_flutter_plugin.iml
View file @
65d6fd04
...
...
@@ -14,6 +14,9 @@
<excludeFolder
url=
"file://$MODULE_DIR$/example/ios/.symlinks/plugins/gengmei_flutter_plugin/.dart_tool"
/>
<excludeFolder
url=
"file://$MODULE_DIR$/example/ios/.symlinks/plugins/gengmei_flutter_plugin/.pub"
/>
<excludeFolder
url=
"file://$MODULE_DIR$/example/ios/.symlinks/plugins/gengmei_flutter_plugin/build"
/>
<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/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"
/>
</content>
...
...
ios/Classes/GengmeiFlutterPlugin.m
View file @
65d6fd04
...
...
@@ -16,6 +16,7 @@
@property
(
nonatomic
,
strong
)
UIImagePickerController
*
imagePicker
;
@property
(
atomic
)
Boolean
quitPage
;
@property
(
atomic
)
Boolean
execdTask
;
@property
(
atomic
)
Boolean
copyScareImgOk
;
@property
(
atomic
)
Boolean
finishScanImg
;
@end
...
...
@@ -269,15 +270,20 @@ FlutterEventSink _eventSink;
[[
ResultManager
sharedSingleton
]
resultSuccess
:[
NSNumber
numberWithLong
:
self
.
nativeCameraKey
]
:
@""
];
}
bool
isRunning
=
false
;
-
(
void
)
scanPhone
:(
long
)
resultId
{
self
.
quitPage
=
false
;
if
(
self
.
finishScanImg
)
{
[[
ResultManager
sharedSingleton
]
resultSuccess
:[
NSNumber
numberWithLong
:
resultId
]
:
self
.
finalMap
];
return
;
}
// if(isRunning){
// isRunning=true;
// return;
// }
if
(
self
.
finalMap
==
nil
)
{
self
.
finalMap
=
[
NSMutableDictionary
dictionary
];
}
if
([
self
.
finalMap
count
]
>
0
&&
self
.
finishScanImg
)
{
[
self
resultImgs
:
resultId
];
return
;
}
self
.
nowSize
=
0
;
self
.
needSize
=
0
;
[
self
.
finalMap
removeAllObjects
];
...
...
@@ -322,6 +328,11 @@ FlutterEventSink _eventSink;
for
(
AlbumItem
*
item
in
assetCollectionList
)
{
self
.
needSize
+=
[
item
collectionNumber
];
}
NSMutableArray
*
arr
=
self
.
finalMap
[
@"IsGengmeiAlbumAllImages"
];
if
(
arr
==
nil
)
{
self
.
finalMap
[
@"IsGengmeiAlbumAllImages"
]
=
[
NSMutableArray
array
];
}
}
-
(
void
)
resultImgs
:
(
long
)
resultId
{
...
...
@@ -329,16 +340,18 @@ FlutterEventSink _eventSink;
return
;
}
dispatch_async
(
dispatch_get_main_queue
(),
^
{
self
.
finishScanImg
=
true
;
[[
ResultManager
sharedSingleton
]
resultSuccess
:[
NSNumber
numberWithLong
:
resultId
]
:
self
.
finalMap
];
if
(
self
.
execdTask
){
return
;
}
self
.
execdTask
=
true
;
[
NSThread
detachNewThreadWithBlock
:
^
{
NSLog
(
@"block run..."
);
[
self
execRealImg
];
}];
// if(self.execdTask){
// return ;
// }
// self.execdTask=true;
// [NSThread detachNewThreadSelector:@selector(run) toTarget:self withObject:nil];
[
NSThread
detachNewThreadSelector
:
@selector
(
thread
:)
toTarget
:
self
withObject
:
@"baby"
];
// [NSThread detachNewThreadSelector: toTarget:<#(nonnull id)#> withObject:<#(nullable id)#>:^{
// NSLog(@"block run...");
//
// }];
// [self performSelectorInBackground:@selector(run) withObject:nil];
// dispatch_queue_t queue1 = dispatch_queue_create("com.onealon.gcdTest1", DISPATCH_QUEUE_CONCURRENT);
// dispatch_sync(queue1, ^{
...
...
@@ -348,6 +361,10 @@ FlutterEventSink _eventSink;
}
-
(
void
)
thread
:
(
id
)
parameter
{
[
self
execRealImg
];
}
-
(
void
)
upImgs
{
dispatch_async
(
dispatch_get_main_queue
(),
^
{
...
...
@@ -364,6 +381,9 @@ FlutterEventSink _eventSink;
AlbumItem
*
item
=
assetCollectionList
[
j
];
PHFetchResult
<
PHAsset
*>
*
assetResult
=
[
item
assets
];
for
(
int
i
=
0
;
i
<
[
assetResult
count
];
i
++
)
{
if
(
self
.
quitPage
){
return
;
}
__block
NSString
*
docName
=
[
item
collectionTitle
];
PHAsset
*
assets
=
[
assetResult
objectAtIndex
:
i
];
__block
NSString
*
imgName
=
[
assets
valueForKey
:
@"filename"
];
...
...
@@ -384,13 +404,14 @@ FlutterEventSink _eventSink;
}
else
{
[
self
.
finalMap
[
docName
]
addObject
:
queryItemDict
];
}
[
self
.
finalMap
[
@"IsGengmeiAlbumAllImages"
]
addObject
:
queryItemDict
];
NSLog
(
@"SCARE SIZEEE %d %d "
,
self
.
nowSize
,
self
.
needSize
);
if
(
self
.
nowSize
==
self
.
needSize
)
{
[
self
resultImgs
:
resultId
];
}
}
else
{
PHImageRequestOptions
*
imageRequestOption
=
[[
PHImageRequestOptions
alloc
]
init
];
imageRequestOption
.
synchronous
=
NO
;
imageRequestOption
.
synchronous
=
YES
;
int
picWidth
=
[
assets
pixelWidth
];
int
picHeight
=
[
assets
pixelHeight
];
float
tempScareSize
=
1
;
...
...
@@ -431,6 +452,7 @@ FlutterEventSink _eventSink;
}
else
{
[
self
.
finalMap
[
docName
]
addObject
:
queryItemDict
];
}
[
self
.
finalMap
[
@"IsGengmeiAlbumAllImages"
]
addObject
:
queryItemDict
];
NSLog
(
@"SCARE SIZEEE %d %d "
,
self
.
nowSize
,
self
.
needSize
);
result
=
nil
;
if
(
self
.
nowSize
==
self
.
needSize
)
{
...
...
@@ -452,6 +474,9 @@ FlutterEventSink _eventSink;
PHFetchResult
<
PHAsset
*>
*
assetResult
=
[
item
assets
];
NSLog
(
@"09090909090 %d %d"
,[
assetResult
count
],
self
.
needSize
);
for
(
int
i
=
0
;
i
<
[
assetResult
count
];
i
++
)
{
if
(
self
.
quitPage
){
return
;
}
__block
NSString
*
docName
=
[
item
collectionTitle
];
PHAsset
*
assets
=
[
assetResult
objectAtIndex
:
i
];
__block
NSString
*
imgName
=
[
assets
valueForKey
:
@"filename"
];
...
...
@@ -479,10 +504,11 @@ FlutterEventSink _eventSink;
NSLog
(
@"SIZEEE %d %d "
,
self
.
nowSize
,
self
.
needSize
);
if
(
self
.
nowSize
==
self
.
needSize
)
{
[
self
upImgs
];
self
.
execdTask
=
true
;
self
.
finishScanImg
=
true
;
// self.execdTask=true;
}
}
else
{
NSLog
(
@"file NOT EXIT !!
"
);
NSLog
(
@"file NOT EXIT !!
%@"
,
realPath
);
PHImageRequestOptions
*
imageRequestOption
=
[[
PHImageRequestOptions
alloc
]
init
];
imageRequestOption
.
synchronous
=
YES
;
int
picWidth
=
[
assets
pixelWidth
];
...
...
@@ -524,9 +550,9 @@ FlutterEventSink _eventSink;
// result=nil;
if
(
self
.
nowSize
==
self
.
needSize
)
{
[
self
upImgs
];
self
.
finishScanImg
=
true
;
self
.
execdTask
=
true
;
}
else
if
(
self
.
copySize
%
35
==
0
||
self
.
copySize
==
10
){
NSLog
(
@"UPPP!!"
);
}
else
if
(
self
.
copySize
%
20
==
0
||
self
.
copySize
==
10
){
[
self
upImgs
];
}
}];
...
...
ios/Classes/Image/AlbumItem.m
View file @
65d6fd04
...
...
@@ -12,11 +12,13 @@
-
(
void
)
setCollection
:(
PHAssetCollection
*
)
collection
{
_collection
=
collection
;
if
([
collection
.
localizedTitle
isEqualToString
:
@"All Photos"
]
||
[
collection
.
localizedTitle
isEqualToString
:
@"所有照片"
])
{
self
.
collectionTitle
=
@"IsGengmeiAlbumAllImages"
;
}
else
{
self
.
collectionTitle
=
collection
.
localizedTitle
;
}
// if ([collection.localizedTitle isEqualToString:@"All Photos"]||[collection.localizedTitle isEqualToString:@"所有照片"]) {
// self.collectionTitle = @"IsGengmeiAlbumAllImages";
// } else {
//
// }
self
.
collectionTitle
=
collection
.
localizedTitle
;
// self.collectionTitle = collection.localizedTitle;
...
...
lib/ScanImagePlugn.dart
View file @
65d6fd04
...
...
@@ -11,6 +11,7 @@ class ScanImagePlugn {
Map
<
String
,
List
<
ScanImageItem
>>
newMap
=
new
Map
();
images
.
forEach
((
k
,
v
)
{
List
<
ScanImageItem
>
tempList
=
new
List
();
print
(
"-------UP
${k}
${tempList.length}
"
);
for
(
var
item
in
v
)
{
ScanImageItem
scanImageItem
=
new
ScanImageItem
();
scanImageItem
.
path
=
item
[
"path"
];
...
...
lib/SharedPlugin.dart
View file @
65d6fd04
...
...
@@ -16,6 +16,8 @@ const String GET_FLOAT_SHARED = "GET_FLOAT_SHARED";
const
String
GET_BOOLEAN_SHARED
=
"GET_BOOLEAN_SHARED"
;
const
String
GET_STRINGLIST_SHARED
=
"GET_STRINGLIST_SHARED"
;
const
String
CLEAR_SHARE
=
"CLEAR_SHARE"
;
class
SharedPlugin
{
static
Future
<
bool
>
saveString
(
String
key
,
String
value
,
MethodChannel
channel
)
async
{
...
...
@@ -75,7 +77,7 @@ class SharedPlugin {
String
key
,
List
<
String
>
value
,
MethodChannel
channel
)
async
{
List
list
=
await
channel
.
invokeMethod
(
GET_STRINGLIST_SHARED
,
{
"key"
:
key
,
"value"
:
value
});
if
(
list
==
null
)
{
if
(
list
==
null
)
{
print
(
"LIST IS NULLL!!!! "
);
return
Future
.
value
(
null
);
}
...
...
@@ -86,4 +88,8 @@ class SharedPlugin {
});
return
Future
.
value
(
finalList
);
}
static
Future
<
bool
>
clear
(
MethodChannel
channel
)
async
{
return
await
channel
.
invokeMethod
(
CLEAR_SHARE
);
}
}
lib/gengmei_flutter_plugin.dart
View file @
65d6fd04
...
...
@@ -27,43 +27,48 @@ class GengmeiFlutterPlugin {
return
await
ScanImagePlugn
.
quitPage
(
_channel
);
}
static
Future
<
int
>
getInt
(
String
key
,
int
value
)
async
{
return
await
SharedPlugin
.
getInt
(
key
,
value
,
_channel
);
static
Future
<
int
>
getInt
(
String
key
,
int
value
)
async
{
return
await
SharedPlugin
.
getInt
(
key
,
value
,
_channel
);
}
static
Future
<
double
>
getDouble
(
String
key
,
double
value
)
async
{
return
await
SharedPlugin
.
getDouble
(
key
,
value
,
_channel
);
static
Future
<
double
>
getDouble
(
String
key
,
double
value
)
async
{
return
await
SharedPlugin
.
getDouble
(
key
,
value
,
_channel
);
}
static
Future
<
String
>
getString
(
String
key
,
String
value
)
async
{
return
await
SharedPlugin
.
getString
(
key
,
value
,
_channel
);
static
Future
<
String
>
getString
(
String
key
,
String
value
)
async
{
return
await
SharedPlugin
.
getString
(
key
,
value
,
_channel
);
}
static
Future
<
bool
>
getbool
(
String
key
,
bool
value
)
async
{
return
await
SharedPlugin
.
getBoolean
(
key
,
value
,
_channel
);
static
Future
<
bool
>
getbool
(
String
key
,
bool
value
)
async
{
return
await
SharedPlugin
.
getBoolean
(
key
,
value
,
_channel
);
}
static
Future
<
List
<
String
>>
getStringList
(
String
key
,
List
<
String
>
value
)
async
{
return
await
SharedPlugin
.
getStringList
(
key
,
value
,
_channel
);
static
Future
<
List
<
String
>>
getStringList
(
String
key
,
List
<
String
>
value
)
async
{
return
await
SharedPlugin
.
getStringList
(
key
,
value
,
_channel
);
}
static
Future
<
bool
>
saveString
(
String
key
,
String
value
)
async
{
static
Future
<
bool
>
saveString
(
String
key
,
String
value
)
async
{
return
await
SharedPlugin
.
saveString
(
key
,
value
,
_channel
);
}
static
Future
<
bool
>
saveInt
(
String
key
,
int
value
)
async
{
static
Future
<
bool
>
saveInt
(
String
key
,
int
value
)
async
{
return
await
SharedPlugin
.
saveInt
(
key
,
value
,
_channel
);
}
static
Future
<
bool
>
saveDouble
(
String
key
,
double
value
)
async
{
static
Future
<
bool
>
saveDouble
(
String
key
,
double
value
)
async
{
return
await
SharedPlugin
.
saveDouble
(
key
,
value
,
_channel
);
}
static
Future
<
bool
>
saveBool
(
String
key
,
bool
value
)
async
{
static
Future
<
bool
>
saveBool
(
String
key
,
bool
value
)
async
{
return
await
SharedPlugin
.
saveBoolean
(
key
,
value
,
_channel
);
}
static
Future
<
bool
>
saveStringList
(
String
key
,
List
<
String
>
value
)
async
{
static
Future
<
bool
>
saveStringList
(
String
key
,
List
<
String
>
value
)
async
{
return
await
SharedPlugin
.
saveStringList
(
key
,
value
,
_channel
);
}
static
Future
<
bool
>
clearShare
()
async
{
return
await
SharedPlugin
.
clear
(
_channel
);
}
}
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