Commit 60f3421d authored by 林生雨's avatar 林生雨

c

parent 9dad6bf6
......@@ -6,6 +6,7 @@
</component>
<component name="ChangeListManager">
<list default="true" id="5be6bbb5-7d6e-4540-a24f-d2b3bf78b3ba" name="Default Changelist" comment="">
<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>
<ignored path="$PROJECT_DIR$/.dart_tool/" />
......@@ -26,11 +27,11 @@
<component name="ExecutionTargetManager" SELECTED_TARGET="AKC0218316000622" />
<component name="FileEditorManager">
<leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
<file pinned="false" current-in-tab="false">
<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="141">
<caret line="233" column="20" selection-start-line="233" selection-start-column="20" selection-end-line="233" selection-end-column="20" />
<state relative-caret-position="223">
<caret line="225" column="60" selection-start-line="225" selection-start-column="60" selection-end-line="225" selection-end-column="60" />
<folding>
<element signature="e#46#66#0" expanded="true" />
</folding>
......@@ -50,7 +51,7 @@
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="true">
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/lib/ScanImagePlugn.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="230">
......@@ -105,7 +106,7 @@
<entry file="file://$PROJECT_DIR$/ios/Classes/GengmeiFlutterPlugin.m">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="10516">
<caret line="507" column="22" selection-start-line="507" selection-start-column="22" selection-end-line="507" selection-end-column="22" />
<caret line="510" column="22" selection-start-line="510" selection-start-column="22" selection-end-line="510" selection-end-column="22" />
</state>
</provider>
</entry>
......@@ -148,8 +149,8 @@
<find>_eventSink</find>
<find>isAdd</find>
<find>onE</find>
<find>realPath</find>
<find>DATTTTTT</find>
<find>realPath</find>
</findStrings>
</component>
<component name="Git.Settings">
......@@ -175,15 +176,15 @@
<option value="$PROJECT_DIR$/example/lib/main.dart" />
<option value="$PROJECT_DIR$/example/lib/AlbumModel/repository/AlbumRepository.dart" />
<option value="$PROJECT_DIR$/example/lib/AlbumModel/page/album/AlbumPage.dart" />
<option value="$PROJECT_DIR$/example/lib/AlbumModel/page/album/AlbumModel.dart" />
<option value="$PROJECT_DIR$/lib/gengmei_flutter_plugin.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="618" />
<option name="y" value="-877" />
<option name="x" value="365" />
<option name="y" value="-923" />
<option name="width" value="1440" />
<option name="height" value="812" />
</component>
......@@ -202,49 +203,6 @@
<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="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" />
<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" />
<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="example" type="462c0819:PsiDirectoryNode" />
<item name="lib" type="462c0819:PsiDirectoryNode" />
<item name="AlbumModel" type="462c0819:PsiDirectoryNode" />
<item name="repository" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="gengmei_flutter_plugin" type="b2602c69:ProjectViewProjectNode" />
<item name="gengmei_flutter_plugin" type="462c0819:PsiDirectoryNode" />
......@@ -300,10 +258,10 @@
<servers />
</component>
<component name="ToolWindowManager">
<frame x="618" y="-877" width="1440" height="812" extended-state="0" />
<frame x="365" y="-923" width="1440" height="812" extended-state="0" />
<editor active="true" />
<layout>
<window_info content_ui="combo" id="Project" order="0" visible="true" weight="0.19742489" />
<window_info active="true" content_ui="combo" id="Project" order="0" visible="true" weight="0.19742489" />
<window_info id="Captures" order="1" side_tool="true" />
<window_info id="Structure" order="2" side_tool="true" />
<window_info id="Image Layers" order="3" />
......@@ -318,7 +276,7 @@
<window_info anchor="bottom" id="Android Profiler" order="3" show_stripe_button="false" />
<window_info anchor="bottom" id="Logcat" order="4" weight="0.5479833" />
<window_info anchor="bottom" id="Debug" order="5" />
<window_info active="true" anchor="bottom" id="Terminal" order="6" visible="true" weight="0.36666667" />
<window_info anchor="bottom" id="Terminal" order="6" visible="true" weight="0.36666667" />
<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" />
......@@ -552,7 +510,7 @@
<entry file="file://$PROJECT_DIR$/ios/Classes/GengmeiFlutterPlugin.m">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="10516">
<caret line="507" column="22" selection-start-line="507" selection-start-column="22" selection-end-line="507" selection-end-column="22" />
<caret line="510" column="22" selection-start-line="510" selection-start-column="22" selection-end-line="510" selection-end-column="22" />
</state>
</provider>
</entry>
......@@ -572,40 +530,40 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/example/lib/AlbumModel/page/album/AlbumPage.dart">
<entry file="file://$PROJECT_DIR$/lib/gengmei_flutter_plugin.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-1229">
<caret line="221" column="20" selection-start-line="221" selection-start-column="20" selection-end-line="221" selection-end-column="20" />
<state relative-caret-position="142">
<caret line="26" column="41" selection-start-line="26" selection-start-column="41" selection-end-line="26" selection-end-column="41" />
<folding>
<element signature="e#45#62#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/AlbumModel.dart">
<entry file="file://$PROJECT_DIR$/lib/ScanImagePlugn.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="141">
<caret line="233" column="20" selection-start-line="233" selection-start-column="20" selection-end-line="233" selection-end-column="20" />
<folding>
<element signature="e#46#66#0" expanded="true" />
</folding>
<state relative-caret-position="230">
<caret line="41" column="1" selection-start-line="41" selection-start-column="1" selection-end-line="41" selection-end-column="1" />
</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="142">
<caret line="26" column="41" selection-start-line="26" selection-start-column="41" selection-end-line="26" selection-end-column="41" />
<state relative-caret-position="-1229">
<caret line="221" column="20" selection-start-line="221" selection-start-column="20" selection-end-line="221" selection-end-column="20" />
<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$/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="230">
<caret line="41" column="1" selection-start-line="41" selection-start-column="1" selection-end-line="41" selection-end-column="1" />
<state relative-caret-position="223">
<caret line="225" column="60" selection-start-line="225" selection-start-column="60" selection-end-line="225" selection-end-column="60" />
<folding>
<element signature="e#46#66#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
......
......@@ -218,10 +218,26 @@ class AlbumModel {
if (_selectList.isEmpty) {
Navigator.pop(context, "");
} else {
Navigator.pop(context, _selectList[0]);
if (Platform.isAndroid) {
Navigator.pop(context, _selectList[0]);
} else {
iosAlbum(_selectList, context, (value) {
print(value);
Navigator.pop(context, List<String>.from(value)[0]);
});
}
}
}
void iosAlbum(List<String> list, BuildContext context, Function fun) {
GengmeiFlutterPlugin.ios_album_path(list).then((value) {
fun(value);
}).catchError((error) {
print(error);
});
}
void nativeCamera(BuildContext context) {
if (_selectList.length == maxCount) {
// Toast.show(context, "最多选择${_maxCount}张图片");
......
......@@ -257,7 +257,8 @@ NSString *cacheDirectory;
}
}];
}else{
if([fileManager fileExistsAtPath:tempPath]){
if([fileManager fileExistsAtPath:tempTake]){
NSLog(@"1111");
self.channelSize++;
[self.channelList addObject:[NSString stringWithFormat:@"%@",tempTake]];
if(self.channelSize==self.channelAllSize){
......@@ -266,6 +267,7 @@ NSString *cacheDirectory;
});
}
}else{
NSLog(@"222");
int picWidth=[assets pixelWidth];
int picHeight=[assets pixelHeight];
float tempScareSize=1;
......@@ -277,12 +279,13 @@ NSString *cacheDirectory;
CGSize temp=CGSizeMake(picWidth*tempScareSize, picHeight*tempScareSize);
[[PHImageManager defaultManager] requestImageForAsset:assets targetSize:temp contentMode:PHImageContentModeDefault options:imageRequestOption resultHandler:^(UIImage * _Nullable res, NSDictionary * _Nullable info) {
@autoreleasepool{
NSData *data = UIImageJPEGRepresentation(res, 0.8) ;
[data writeToFile:tempTake atomically:YES];
data=nil;
res=nil;
}
// @autoreleasepool{
NSLog(@"33333");
NSData *data = UIImageJPEGRepresentation(res, 0.8) ;
[data writeToFile:tempTake atomically:YES];
data=nil;
res=nil;
// }
self.channelSize++;
[self.channelList addObject:[NSString stringWithFormat:@"%@",tempTake]];
if(self.channelSize==self.channelAllSize){
......@@ -552,14 +555,16 @@ NSString *cacheDirectory;
[queryItemDict setObject:tmpPath forKey:@"path"];
[queryItemDict setObject:@"T" forKey:@"isVideo"];
[self.scanMap setObject:assets forKey:tmpPath];
NSMutableArray * arr=self.finalMap[docName];
if (arr==nil) {
self.finalMap[docName]=[NSMutableArray array];
[self.finalMap[docName] addObject:queryItemDict];
}else{
[self.finalMap[docName] addObject:queryItemDict];
@synchronized (self) {
NSMutableArray * arr=self.finalMap[docName];
if (arr==nil) {
self.finalMap[docName]=[NSMutableArray array];
[self.finalMap[docName] addObject:queryItemDict];
}else{
[self.finalMap[docName] addObject:queryItemDict];
}
[self.finalMap[@"IsGengmeiAlbumAllImages"] addObject:queryItemDict];
}
[self.finalMap[@"IsGengmeiAlbumAllImages"] addObject:queryItemDict];
NSLog(@"SCARE SIZEEE %d %d ",self.nowSize,self.needSize);
if (self.nowSize==self.needSize) {
[self resultImgs:resultId];
......@@ -594,14 +599,16 @@ NSString *cacheDirectory;
[queryItemDict setObject:tmpPath forKey:@"path"];
[queryItemDict setObject:@"T" forKey:@"isVideo"];
[self.scanMap setObject:assets forKey:tmpPath];
NSMutableArray * arr=self.finalMap[docName];
if (arr==nil) {
self.finalMap[docName]=[NSMutableArray array];
[self.finalMap[docName] addObject:queryItemDict];
}else{
[self.finalMap[docName] addObject:queryItemDict];
@synchronized (self) {
NSMutableArray * arr=self.finalMap[docName];
if (arr==nil) {
self.finalMap[docName]=[NSMutableArray array];
[self.finalMap[docName] addObject:queryItemDict];
}else{
[self.finalMap[docName] addObject:queryItemDict];
}
[self.finalMap[@"IsGengmeiAlbumAllImages"] addObject:queryItemDict];
}
[self.finalMap[@"IsGengmeiAlbumAllImages"] addObject:queryItemDict];
NSLog(@"SCARE SIZEEE %d %d ",self.nowSize,self.needSize);
if (self.nowSize==self.needSize) {
[self resultImgs:resultId];
......@@ -617,14 +624,16 @@ NSString *cacheDirectory;
[queryItemDict setObject:tmpPath forKey:@"path"];
[queryItemDict setObject:@"F" forKey:@"isVideo"];
[self.scanMap setObject:assets forKey:tmpPath];
NSMutableArray * arr=self.finalMap[docName];
if (arr==nil) {
self.finalMap[docName]=[NSMutableArray array];
[self.finalMap[docName] addObject:queryItemDict];
}else{
[self.finalMap[docName] addObject:queryItemDict];
@synchronized (self) {
NSMutableArray * arr=self.finalMap[docName];
if (arr==nil) {
self.finalMap[docName]=[NSMutableArray array];
[self.finalMap[docName] addObject:queryItemDict];
}else{
[self.finalMap[docName] addObject:queryItemDict];
}
[self.finalMap[@"IsGengmeiAlbumAllImages"] addObject:queryItemDict];
}
[self.finalMap[@"IsGengmeiAlbumAllImages"] addObject:queryItemDict];
NSLog(@"SCARE SIZEEE %d %d ",self.nowSize,self.needSize);
if (self.nowSize==self.needSize) {
[self resultImgs:resultId];
......@@ -655,28 +664,21 @@ NSString *cacheDirectory;
[queryItemDict setObject:tmpPath forKey:@"path"];
[queryItemDict setObject:@"F" forKey:@"isVideo"];
[self.scanMap setObject:assets forKey:tmpPath];
NSMutableArray * arr=self.finalMap[docName];
self.copySize++;
if (arr==nil) {
self.finalMap[docName]=[NSMutableArray array];
[self.finalMap[docName] addObject:queryItemDict];
}else{
[self.finalMap[docName] addObject:queryItemDict];
@synchronized (self) {
NSMutableArray * arr=self.finalMap[docName];
if (arr==nil) {
self.finalMap[docName]=[NSMutableArray array];
[self.finalMap[docName] addObject:queryItemDict];
}else{
[self.finalMap[docName] addObject:queryItemDict];
}
[self.finalMap[@"IsGengmeiAlbumAllImages"] addObject:queryItemDict];
}
[self.finalMap[@"IsGengmeiAlbumAllImages"] addObject:queryItemDict];
NSLog(@"SCARE SIZEEE %d %d ",self.nowSize,self.needSize);
if (self.nowSize==self.needSize) {
[self resultImgs:resultId];
}
// if(self.needSize>80&&self.copySize==80){
// [self resultImgs:resultId];
// }else if(self.needSize<=80&&self.nowSize==self.needSize){
// [self resultImgs:resultId];
// }else if(self.needSize>80&&self.nowSize==self.needSize){
// [self upImgs];
// }else if(self.needSize>80&&self.copySize>80&&self.copySize%200==0){
// [self upImgs];
// }
}];
}
}
......
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