Flutter_Image_picker_demo

2019-01-22  本文已影响0人  飞行的猫

一: iPhone添加权限字段,
<key>NSCameraUsageDescription</key>
<string>Used to demonstrate image picker plugin</string>
<key>NSMicrophoneUsageDescription</key>
<string>Used to capture audio for image picker plugin</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>Used to demonstrate image picker plugin</string>
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>

WeChat664e4bf65188aeabc6fc565f661c47fd.png

二: 在pubspec.yaml文件中添加插件(command+s保存后VSCode自动添加两个插件),如图:


WeChat0cf62a507b767bd3a6da301ed63b5ab2.png

三: 具体代码看demo

https://github.com/wangjianquan/flutterImagePickerDemo.git

上一篇 下一篇

猜你喜欢

热点阅读