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
6244d479
Commit
6244d479
authored
Dec 26, 2019
by
林生雨
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
commit
parent
47b85639
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
25 additions
and
6 deletions
+25
-6
workspace.xml
.idea/workspace.xml
+7
-3
GengmeiFlutterPlugin.m
ios/Classes/GengmeiFlutterPlugin.m
+10
-3
ScanImagePlugn.dart
lib/ScanImagePlugn.dart
+4
-0
gengmei_flutter_plugin.dart
lib/gengmei_flutter_plugin.dart
+4
-0
No files found.
.idea/workspace.xml
View file @
6244d479
...
...
@@ -5,7 +5,11 @@
<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=
""
/>
<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$/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/"
/>
...
...
@@ -263,7 +267,7 @@
<servers
/>
</component>
<component
name=
"ToolWindowManager"
>
<frame
x=
"
3"
y=
"23
"
width=
"1440"
height=
"812"
extended-state=
"6"
/>
<frame
x=
"
0"
y=
"26
"
width=
"1440"
height=
"812"
extended-state=
"6"
/>
<layout>
<window_info
content_ui=
"combo"
id=
"Project"
order=
"0"
visible=
"$ENABLE_FLUTTER_DESKTOP$"
weight=
"0.19742489"
/>
<window_info
id=
"Captures"
order=
"1"
side_tool=
"$ENABLE_FLUTTER_DESKTOP$"
/>
...
...
@@ -280,7 +284,7 @@
<window_info
anchor=
"bottom"
id=
"Android Profiler"
order=
"3"
show_stripe_button=
"false"
/>
<window_info
anchor=
"bottom"
id=
"Logcat"
order=
"4"
weight=
"0.20166898"
/>
<window_info
anchor=
"bottom"
id=
"Debug"
order=
"5"
weight=
"0.32962447"
/>
<window_info
active=
"$ENABLE_FLUTTER_DESKTOP$"
anchor=
"bottom"
id=
"Terminal"
order=
"6"
visible=
"$ENABLE_FLUTTER_DESKTOP$"
weight=
"0.
28194445
"
/>
<window_info
active=
"$ENABLE_FLUTTER_DESKTOP$"
anchor=
"bottom"
id=
"Terminal"
order=
"6"
visible=
"$ENABLE_FLUTTER_DESKTOP$"
weight=
"0.
32777777
"
/>
<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"
/>
...
...
ios/Classes/GengmeiFlutterPlugin.m
View file @
6244d479
...
...
@@ -262,7 +262,7 @@ NSString *cacheDirectory;
imageRequestOption
.
version
=
PHImageRequestOptionsVersionUnadjusted
;
NSString
*
tempPathBefore
=
NSTemporaryDirectory
();
NSFileManager
*
manager
=
[
NSFileManager
defaultManager
];
NSString
*
tempPath
=
[
tempPathBefore
stringByAppendingPathComponent
:
@"
10101
"
];
NSString
*
tempPath
=
[
tempPathBefore
stringByAppendingPathComponent
:
@"
REALPATH
"
];
[
manager
createDirectoryAtPath
:
tempPath
withIntermediateDirectories
:
YES
attributes
:
nil
error
:
nil
];
NSFileManager
*
fileManager
=
[
NSFileManager
defaultManager
];
for
(
int
i
=
0
;
i
<
path
.
count
;
i
++
)
{
...
...
@@ -492,12 +492,19 @@ NSString *cacheDirectory;
[
self
.
finalMap
[
@"IsGengmeiAlbumAllImages"
]
insertObject
:
dict
atIndex
:
0
];
[
self
.
takePhotoMap
setObject
:
realPath
forKey
:
path
];
[[
ResultManager
sharedSingleton
]
resultSuccess
:[
NSNumber
numberWithLong
:
resultTemp
]
:
@YES
];
}
else
{
}
else
if
([
@"clear_data"
isEqualToString
:
call
.
method
]){
long
resultTemp
=
self
.
resultKey
;
NSString
*
tempPathBefore
=
NSTemporaryDirectory
();
NSString
*
tempPath
=
[
tempPathBefore
stringByAppendingPathComponent
:
@"REALPATH"
];
[
self
removeAllFilesAtPath
:
tempPath
];
[[
ResultManager
sharedSingleton
]
resultSuccess
:[
NSNumber
numberWithLong
:
resultTemp
]
:
@YES
];
}
else
{
result
(
FlutterMethodNotImplemented
);
}
}
+
(
BOOL
)
removeAllFilesAtPath
:(
NSString
*
)
path
{
-
(
BOOL
)
removeAllFilesAtPath
:(
NSString
*
)
path
{
NSDirectoryEnumerator
*
enumerator
=
[[
NSFileManager
defaultManager
]
enumeratorAtPath
:
path
];
BOOL
result
=
YES
;
...
...
lib/ScanImagePlugn.dart
View file @
6244d479
...
...
@@ -61,6 +61,10 @@ class ScanImagePlugn {
return
await
channel
.
invokeMethod
(
"quit_page"
);
}
static
Future
<
bool
>
clearCache
(
MethodChannel
channel
)
async
{
return
await
channel
.
invokeMethod
(
"clear_data"
);
}
static
Future
<
List
>
ios_album_path
(
MethodChannel
channel
,
List
<
String
>
path
)
async
{
return
await
channel
.
invokeMethod
(
"IOS_IMAGE_BY_PATH"
,
path
);
...
...
lib/gengmei_flutter_plugin.dart
View file @
6244d479
...
...
@@ -35,6 +35,10 @@ class GengmeiFlutterPlugin {
return
await
ScanImagePlugn
.
previewImage
(
_channel
,
path
);
}
static
Future
<
bool
>
clearCache
()
async
{
return
await
ScanImagePlugn
.
clearCache
(
_channel
);
}
static
Future
<
bool
>
playAlbumVideo
(
String
path
)
async
{
return
await
ScanImagePlugn
.
playAlbumVideo
(
_channel
,
path
);
}
...
...
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