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
34e33a22
Commit
34e33a22
authored
Jan 08, 2020
by
林生雨
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
commit
parent
fe34098b
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
8 deletions
+9
-8
workspace.xml
.idea/workspace.xml
+0
-0
AlbumModel.dart
example/lib/AlbumModel/page/album/AlbumModel.dart
+3
-2
GengmeiFlutterPlugin.m
ios/Classes/GengmeiFlutterPlugin.m
+5
-5
ScanImagePlugn.dart
lib/ScanImagePlugn.dart
+1
-1
No files found.
.idea/workspace.xml
View file @
34e33a22
This diff is collapsed.
Click to expand it.
example/lib/AlbumModel/page/album/AlbumModel.dart
View file @
34e33a22
...
...
@@ -122,6 +122,9 @@ class AlbumModel {
compute
(
paseAlbum
,
event
).
then
((
value
)
{
_mainValue
=
value
;
albumLive
.
notifyView
(
_mainValue
[
_nowDirName
]);
});
// }
...
...
@@ -163,11 +166,9 @@ class AlbumModel {
}
void
initScanImages
(
BuildContext
context
)
{
// if (isAndroid) {
_listen
=
GengmeiFlutterPlugin
.
phoneImagesEvent
.
receiveBroadcastStream
()
.
listen
(
_onEvent
,
onError:
_onError
);
// }
AlbumRepository
.
getInstance
().
scanPhoneImg
().
listen
((
value
)
{
if
(
value
!=
null
)
{
_mainValue
=
value
;
...
...
ios/Classes/GengmeiFlutterPlugin.m
View file @
34e33a22
...
...
@@ -539,9 +539,9 @@ NSString *cacheDirectory;
}
else
{
[[
ResultManager
sharedSingleton
]
resultSuccess
:[
NSNumber
numberWithLong
:
resultTemp
]
:
nil
];
}
}
else
if
([
@"GET_IOS_
IMAGE
_DATA"
isEqualToString
:
call
.
method
]){
}
else
if
([
@"GET_IOS_
VIDEO
_DATA"
isEqualToString
:
call
.
method
]){
NSString
*
path
=
call
.
arguments
;
long
resultTemp
=
self
.
resultKey
;
long
resultTemp
Video
=
self
.
resultKey
;
if
(
path
!=
nil
){
if
([[
self
.
scanMap
allKeys
]
containsObject
:
path
]){
PHAsset
*
assets
=
self
.
scanMap
[
path
];
...
...
@@ -551,13 +551,13 @@ NSString *cacheDirectory;
options
.
deliveryMode
=
PHVideoRequestOptionsDeliveryModeAutomatic
;
[[
PHImageManager
defaultManager
]
requestAVAssetForVideo
:
assets
options
:
options
resultHandler
:^
(
AVAsset
*
_Nullable
asset
,
AVAudioMix
*
_Nullable
audioMix
,
NSDictionary
*
_Nullable
info
)
{
AVURLAsset
*
urlAsset
=
(
AVURLAsset
*
)
asset
;
[[
ResultManager
sharedSingleton
]
resultSuccess
:[
NSNumber
numberWithLong
:
resultTemp
]
:
[
NSString
stringWithFormat
:
@"%@"
,
urlAsset
.
URL
]];
[[
ResultManager
sharedSingleton
]
resultSuccess
:[
NSNumber
numberWithLong
:
resultTemp
Video
]
:
[
NSString
stringWithFormat
:
@"%@"
,
urlAsset
.
URL
]];
}];
}
else
{
[[
ResultManager
sharedSingleton
]
resultSuccess
:[
NSNumber
numberWithLong
:
resultTemp
]
:
nil
];
[[
ResultManager
sharedSingleton
]
resultSuccess
:[
NSNumber
numberWithLong
:
resultTemp
Video
]
:
nil
];
}
}
else
{
[[
ResultManager
sharedSingleton
]
resultSuccess
:[
NSNumber
numberWithLong
:
resultTemp
]
:
nil
];
[[
ResultManager
sharedSingleton
]
resultSuccess
:[
NSNumber
numberWithLong
:
resultTemp
Video
]
:
nil
];
}
}
else
{
...
...
lib/ScanImagePlugn.dart
View file @
34e33a22
...
...
@@ -81,7 +81,7 @@ class ScanImagePlugn {
}
static
Future
<
String
>
getIosVideoData
(
MethodChannel
channel
,
String
path
)
async
{
return
await
channel
.
invokeMethod
(
"GET_IOS_
IMAGE
_DATA"
,
path
);
return
await
channel
.
invokeMethod
(
"GET_IOS_
VIDEO
_DATA"
,
path
);
}
static
Future
<
List
>
ios_album_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