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
ba1e291c
Commit
ba1e291c
authored
Jan 08, 2020
by
林生雨
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
com
parent
34e33a22
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
40 additions
and
42 deletions
+40
-42
workspace.xml
.idea/workspace.xml
+31
-35
GengmeiFlutterPlugin.m
ios/Classes/GengmeiFlutterPlugin.m
+9
-7
No files found.
.idea/workspace.xml
View file @
ba1e291c
...
...
@@ -6,12 +6,7 @@
<option
name=
"TOOL_WINDOW_CONFIGURED_FILTER"
value=
"Show only selected application"
/>
</component>
<component
name=
"ChangeListManager"
>
<list
default=
"$ENABLE_FLUTTER_DESKTOP$"
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/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"
/>
</list>
<list
default=
"$ENABLE_FLUTTER_DESKTOP$"
id=
"5be6bbb5-7d6e-4540-a24f-d2b3bf78b3ba"
name=
"Default Changelist"
comment=
""
/>
<ignored
path=
"$PROJECT_DIR$/.dart_tool/"
/>
<ignored
path=
"$PROJECT_DIR$/.idea/"
/>
<ignored
path=
"$PROJECT_DIR$/.pub/"
/>
...
...
@@ -33,8 +28,8 @@
<file
pinned=
"false"
current-in-tab=
"false"
>
<entry
file=
"file://$PROJECT_DIR$/lib/gengmei_flutter_plugin.dart"
>
<provider
selected=
"$ENABLE_FLUTTER_DESKTOP$"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"1
33
"
>
<caret
line=
"57"
column=
"
42"
lean-forward=
"$ENABLE_FLUTTER_DESKTOP$"
selection-start-line=
"57"
selection-start-column=
"42"
selection-end-line=
"57"
selection-end-column=
"42
"
/>
<state
relative-caret-position=
"1
11
"
>
<caret
line=
"57"
column=
"
38"
selection-start-line=
"57"
selection-start-column=
"38"
selection-end-line=
"57"
selection-end-column=
"38
"
/>
<folding>
<element
signature=
"e#0#20#0"
expanded=
"$ENABLE_FLUTTER_DESKTOP$"
/>
</folding>
...
...
@@ -66,11 +61,11 @@
<provider
selected=
"$ENABLE_FLUTTER_DESKTOP$"
editor-type-id=
"text-editor"
/>
</entry>
</file>
<file
pinned=
"false"
current-in-tab=
"
false
"
>
<file
pinned=
"false"
current-in-tab=
"
$ENABLE_FLUTTER_DESKTOP$
"
>
<entry
file=
"file://$PROJECT_DIR$/example/lib/AlbumModel/page/album/AlbumModel.dart"
>
<provider
selected=
"$ENABLE_FLUTTER_DESKTOP$"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"1
80
"
>
<caret
line=
"1
95"
column=
"37"
selection-start-line=
"195"
selection-start-column=
"37"
selection-end-line=
"195"
selection-end-column=
"37
"
/>
<state
relative-caret-position=
"1
95
"
>
<caret
line=
"1
71"
selection-start-line=
"171"
selection-end-line=
"171
"
/>
<folding>
<element
signature=
"e#46#66#0"
expanded=
"$ENABLE_FLUTTER_DESKTOP$"
/>
</folding>
...
...
@@ -90,11 +85,11 @@
</provider>
</entry>
</file>
<file
pinned=
"false"
current-in-tab=
"
$ENABLE_FLUTTER_DESKTOP$
"
>
<file
pinned=
"false"
current-in-tab=
"
false
"
>
<entry
file=
"file://$PROJECT_DIR$/lib/ScanImagePlugn.dart"
>
<provider
selected=
"$ENABLE_FLUTTER_DESKTOP$"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"1
33
"
>
<caret
line=
"8
3"
column=
"57"
selection-start-line=
"83"
selection-start-column=
"39"
selection-end-line=
"83"
selection-end-column=
"57
"
/>
<state
relative-caret-position=
"1
11
"
>
<caret
line=
"8
2"
column=
"24"
selection-start-line=
"82"
selection-start-column=
"24"
selection-end-line=
"82"
selection-end-column=
"24
"
/>
<folding>
<element
signature=
"e#45#62#0"
expanded=
"$ENABLE_FLUTTER_DESKTOP$"
/>
</folding>
...
...
@@ -196,8 +191,8 @@
</option>
</component>
<component
name=
"ProjectFrameBounds"
extendedState=
"6"
>
<option
name=
"x"
value=
"
45
"
/>
<option
name=
"y"
value=
"
23
"
/>
<option
name=
"x"
value=
"
-111
"
/>
<option
name=
"y"
value=
"
136
"
/>
<option
name=
"width"
value=
"1440"
/>
<option
name=
"height"
value=
"811"
/>
</component>
...
...
@@ -345,12 +340,12 @@
<window_info
id=
"Capture Tool"
order=
"7"
/>
<window_info
id=
"Favorites"
order=
"8"
side_tool=
"$ENABLE_FLUTTER_DESKTOP$"
/>
<window_info
anchor=
"bottom"
id=
"Dart Analysis"
order=
"0"
weight=
"0.32963988"
/>
<window_info
a
ctive=
"$ENABLE_FLUTTER_DESKTOP$"
anchor=
"bottom"
id=
"Run"
order=
"1"
visible=
"$ENABLE_FLUTTER_DESKTOP$
"
weight=
"0.49791378"
/>
<window_info
a
nchor=
"bottom"
id=
"Run"
order=
"1
"
weight=
"0.49791378"
/>
<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.42837274"
/>
<window_info
anchor=
"bottom"
id=
"Debug"
order=
"5"
weight=
"0.32962447"
/>
<window_info
a
nchor=
"bottom"
id=
"Terminal"
order=
"6"
weight=
"0.08066759
"
/>
<window_info
a
ctive=
"$ENABLE_FLUTTER_DESKTOP$"
anchor=
"bottom"
id=
"Terminal"
order=
"6"
visible=
"$ENABLE_FLUTTER_DESKTOP$"
weight=
"0.5632823
"
/>
<window_info
anchor=
"bottom"
id=
"Event Log"
order=
"7"
side_tool=
"$ENABLE_FLUTTER_DESKTOP$"
/>
<window_info
anchor=
"bottom"
id=
"Flutter Performance"
order=
"8"
side_tool=
"$ENABLE_FLUTTER_DESKTOP$"
/>
<window_info
anchor=
"bottom"
id=
"Version Control"
order=
"9"
/>
...
...
@@ -613,13 +608,6 @@
<entry
file=
"file://$PROJECT_DIR$/ios/Classes/MyPlayerViewController.m"
>
<provider
selected=
"$ENABLE_FLUTTER_DESKTOP$"
editor-type-id=
"text-editor"
/>
</entry>
<entry
file=
"file://$PROJECT_DIR$/lib/SharedPlugin.dart"
>
<provider
selected=
"$ENABLE_FLUTTER_DESKTOP$"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"308"
>
<caret
line=
"17"
selection-start-line=
"17"
selection-end-line=
"17"
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/ios/Classes/GengmeiFlutterPlugin.m"
>
<provider
selected=
"$ENABLE_FLUTTER_DESKTOP$"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"22"
>
...
...
@@ -650,20 +638,17 @@
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/
example/lib/AlbumModel/page/album/AlbumModel
.dart"
>
<entry
file=
"file://$PROJECT_DIR$/
lib/SharedPlugin
.dart"
>
<provider
selected=
"$ENABLE_FLUTTER_DESKTOP$"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"180"
>
<caret
line=
"195"
column=
"37"
selection-start-line=
"195"
selection-start-column=
"37"
selection-end-line=
"195"
selection-end-column=
"37"
/>
<folding>
<element
signature=
"e#46#66#0"
expanded=
"$ENABLE_FLUTTER_DESKTOP$"
/>
</folding>
<state
relative-caret-position=
"308"
>
<caret
line=
"17"
selection-start-line=
"17"
selection-end-line=
"17"
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/lib/gengmei_flutter_plugin.dart"
>
<provider
selected=
"$ENABLE_FLUTTER_DESKTOP$"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"1
33
"
>
<caret
line=
"57"
column=
"
42"
lean-forward=
"$ENABLE_FLUTTER_DESKTOP$"
selection-start-line=
"57"
selection-start-column=
"42"
selection-end-line=
"57"
selection-end-column=
"42
"
/>
<state
relative-caret-position=
"1
11
"
>
<caret
line=
"57"
column=
"
38"
selection-start-line=
"57"
selection-start-column=
"38"
selection-end-line=
"57"
selection-end-column=
"38
"
/>
<folding>
<element
signature=
"e#0#20#0"
expanded=
"$ENABLE_FLUTTER_DESKTOP$"
/>
</folding>
...
...
@@ -672,13 +657,23 @@
</entry>
<entry
file=
"file://$PROJECT_DIR$/lib/ScanImagePlugn.dart"
>
<provider
selected=
"$ENABLE_FLUTTER_DESKTOP$"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"1
33
"
>
<caret
line=
"8
3"
column=
"57"
selection-start-line=
"83"
selection-start-column=
"39"
selection-end-line=
"83"
selection-end-column=
"57
"
/>
<state
relative-caret-position=
"1
11
"
>
<caret
line=
"8
2"
column=
"24"
selection-start-line=
"82"
selection-start-column=
"24"
selection-end-line=
"82"
selection-end-column=
"24
"
/>
<folding>
<element
signature=
"e#45#62#0"
expanded=
"$ENABLE_FLUTTER_DESKTOP$"
/>
</folding>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/example/lib/AlbumModel/page/album/AlbumModel.dart"
>
<provider
selected=
"$ENABLE_FLUTTER_DESKTOP$"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"195"
>
<caret
line=
"171"
selection-start-line=
"171"
selection-end-line=
"171"
/>
<folding>
<element
signature=
"e#46#66#0"
expanded=
"$ENABLE_FLUTTER_DESKTOP$"
/>
</folding>
</state>
</provider>
</entry>
</component>
</project>
\ No newline at end of file
ios/Classes/GengmeiFlutterPlugin.m
View file @
ba1e291c
...
...
@@ -37,6 +37,7 @@ dispatch_queue_t queue;
NSObject
<
FlutterPluginRegistrar
>*
resign
;
FlutterEventSink
_eventSink
;
NSString
*
cacheDirectory
;
PHImageRequestOptions
*
baseImageRequestOption
;
+
(
void
)
registerWithRegistrar
:(
NSObject
<
FlutterPluginRegistrar
>*
)
registrar
{
GengmeiFlutterPlugin
*
instance
=
[[
GengmeiFlutterPlugin
alloc
]
init
];
// resign=registrar;
...
...
@@ -50,6 +51,13 @@ NSString *cacheDirectory;
concurrentQueue
=
dispatch_queue_create
(
"com.gengmei_flutter_plugin"
,
DISPATCH_QUEUE_CONCURRENT
);
// concurrentQueue=dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_HIGH, 0);
queue
=
dispatch_queue_create
(
"com.gengmei_flutter_plugin"
,
DISPATCH_QUEUE_SERIAL
);
baseImageRequestOption
=
[[
PHImageRequestOptions
alloc
]
init
];
baseImageRequestOption
.
synchronous
=
NO
;
baseImageRequestOption
.
networkAccessAllowed
=
YES
;
baseImageRequestOption
.
deliveryMode
=
PHImageRequestOptionsDeliveryModeHighQualityFormat
;
baseImageRequestOption
.
resizeMode
=
PHImageRequestOptionsResizeModeFast
;
baseImageRequestOption
.
version
=
PHImageRequestOptionsVersionUnadjusted
;
FlutterEventChannel
*
chargingChannel
=
[
FlutterEventChannel
eventChannelWithName
:
@"gengmei_flutter_plugin_event"
binaryMessenger
:[
registrar
messenger
]];
...
...
@@ -515,14 +523,8 @@ NSString *cacheDirectory;
if
(
path
!=
nil
){
if
([[
self
.
scanMap
allKeys
]
containsObject
:
path
]){
PHAsset
*
assets
=
self
.
scanMap
[
path
];
PHImageRequestOptions
*
imageRequestOption
=
[[
PHImageRequestOptions
alloc
]
init
];
imageRequestOption
.
synchronous
=
NO
;
imageRequestOption
.
networkAccessAllowed
=
YES
;
imageRequestOption
.
deliveryMode
=
PHImageRequestOptionsDeliveryModeHighQualityFormat
;
imageRequestOption
.
resizeMode
=
PHImageRequestOptionsResizeModeFast
;
imageRequestOption
.
version
=
PHImageRequestOptionsVersionUnadjusted
;
@autoreleasepool
{
[[
PHImageManager
defaultManager
]
requestImageDataForAsset
:
assets
options
:
i
mageRequestOption
resultHandler
:^
(
NSData
*
_Nullable
imageData
,
NSString
*
_Nullable
dataUTI
,
UIImageOrientation
orientation
,
NSDictionary
*
_Nullable
info
)
{
[[
PHImageManager
defaultManager
]
requestImageDataForAsset
:
assets
options
:
baseI
mageRequestOption
resultHandler
:^
(
NSData
*
_Nullable
imageData
,
NSString
*
_Nullable
dataUTI
,
UIImageOrientation
orientation
,
NSDictionary
*
_Nullable
info
)
{
[[
ResultManager
sharedSingleton
]
resultSuccess
:[
NSNumber
numberWithLong
:
resultTemp
]
:
[
FlutterStandardTypedData
typedDataWithBytes
:
UIImageJPEGRepresentation
([
UIImage
imageWithData
:
imageData
],
1
.
0
)]];
}];
}
...
...
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