您的当前位置:首页正文

Flutter imagePicker

2024-11-23 来源:个人技术集锦

一: 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>

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

三: 具体代码看demo


转载于:https://juejin.im/post/5c4746c451882523995e18c5

显示全文