feat(client): 商品详情页支持拍照添加照片(Android/iOS)

- 移动端加图改用 image_picker,底部弹出「拍照 / 从相册选择」二选一;
  桌面/Web 保持 file_picker 文件选择
- 用 defaultTargetPlatform 判断移动端,避免在参与 Web 编译的文件引入 dart:io
- iOS:Info.plist 增加 NSCameraUsageDescription / NSPhotoLibraryUsageDescription
- Android:拍照走系统相机、相册走 Photo Picker,均无需声明权限

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
wangjia
2026-06-07 14:47:08 +08:00
parent 5278bea940
commit 211fafc7e1
7 changed files with 165 additions and 4 deletions
@@ -6,10 +6,13 @@
#include "generated_plugin_registrant.h"
#include <file_selector_windows/file_selector_windows.h>
#include <printing/printing_plugin.h>
#include <url_launcher_windows/url_launcher_windows.h>
void RegisterPlugins(flutter::PluginRegistry* registry) {
FileSelectorWindowsRegisterWithRegistrar(
registry->GetRegistrarForPlugin("FileSelectorWindows"));
PrintingPluginRegisterWithRegistrar(
registry->GetRegistrarForPlugin("PrintingPlugin"));
UrlLauncherWindowsRegisterWithRegistrar(