Commit 6244d479 authored by 林生雨's avatar 林生雨

commit

parent 47b85639
......@@ -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" />
......
......@@ -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;
......
......@@ -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);
......
......@@ -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);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment