Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
ShareExtend
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
李增强
ShareExtend
Commits
67f7ba7f
Commit
67f7ba7f
authored
5 years ago
by
zhouteng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update the example and add NSPhotoLibraryUsageDescription for image picker plugin to info.plist
parent
eb5c7500
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
2 deletions
+8
-2
example/ios/Runner/Info.plist
example/ios/Runner/Info.plist
+2
-0
example/lib/main.dart
example/lib/main.dart
+6
-2
No files found.
example/ios/Runner/Info.plist
View file @
67f7ba7f
...
@@ -43,5 +43,7 @@
...
@@ -43,5 +43,7 @@
<false/>
<false/>
<key>
NSPhotoLibraryAddUsageDescription
</key>
<key>
NSPhotoLibraryAddUsageDescription
</key>
<string>
App needs photo library permission for saving images
</string>
<string>
App needs photo library permission for saving images
</string>
<key>
NSPhotoLibraryUsageDescription
</key>
<string>
Used to demonstrate image picker plugin
</string>
</dict>
</dict>
</plist>
</plist>
This diff is collapsed.
Click to expand it.
example/lib/main.dart
View file @
67f7ba7f
...
@@ -39,7 +39,9 @@ class _MyAppState extends State<MyApp> {
...
@@ -39,7 +39,9 @@ class _MyAppState extends State<MyApp> {
onPressed:
()
async
{
onPressed:
()
async
{
File
f
=
await
ImagePicker
.
pickImage
(
File
f
=
await
ImagePicker
.
pickImage
(
source
:
ImageSource
.
gallery
);
source
:
ImageSource
.
gallery
);
if
(
f
!=
null
)
{
ShareExtend
.
share
(
f
.
path
,
"image"
);
ShareExtend
.
share
(
f
.
path
,
"image"
);
}
},
},
child:
new
Text
(
"share image"
),
child:
new
Text
(
"share image"
),
),
),
...
@@ -47,7 +49,9 @@ class _MyAppState extends State<MyApp> {
...
@@ -47,7 +49,9 @@ class _MyAppState extends State<MyApp> {
onPressed:
()
async
{
onPressed:
()
async
{
File
f
=
await
ImagePicker
.
pickVideo
(
File
f
=
await
ImagePicker
.
pickVideo
(
source
:
ImageSource
.
gallery
);
source
:
ImageSource
.
gallery
);
if
(
f
!=
null
)
{
ShareExtend
.
share
(
f
.
path
,
"video"
);
ShareExtend
.
share
(
f
.
path
,
"video"
);
}
},
},
child:
new
Text
(
"share video"
),
child:
new
Text
(
"share video"
),
),
),
...
...
This diff is collapsed.
Click to expand it.
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