1 Star 0 Fork 2

ffac / flutter_wechat_camera_picker

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

Flutter WeChat Camera Picker

pub package pub package GitHub stars GitHub forks Build status CodeFactor GitHub license FlutterCandies

Language: English | 中文简体

仿微信资源选择器 的扩展。 基于 camera 实现相机相关功能,photo_manager 实现资源相关内容。

目录 🗂

特性 ✨

  • 🔐 支持健全的空安全
  • 💚 99% 的微信风格
  • 📷 支持拍照
    • ☀️ 支持设置曝光参数
    • 🔍️ 支持捏合缩放
  • 🎥 支持录像
    • ⏱ 支持限制录像时间
    • 🔍 支持录像时缩放
  • 🖾 支持自定义前景 widget 构建

截图 📸

准备工作 🍭

版本限制

Flutter SDK:>=2.0.0

配置

使用方法 📖

参数名 类型 描述 默认值
enableRecording bool 选择器是否可以录像 false
onlyEnableRecording bool 选择器是否仅可以录像。只在 enableRecordingtrue 时有效。 false
enableAudio bool 选择器是否需要录制音频。只于录像配合有效。 true
enableSetExposure bool 用户是否可以在界面上通过点击设定曝光点 true
enableExposureControlOnPoint bool 用户是否可以根据已经设置的曝光点调节曝光度 true
enablePinchToZoom bool 用户是否可以在界面上双指缩放相机对焦 true
enablePullToZoomInRecord bool 用户是否可以在录制视频时上拉缩放 true
shouldDeletePreviewFile bool 返回页面时是否删除预览文件 false
maximumRecordingDuration Duration 录制视频最长时长 const Duration(seconds: 15)
theme ThemeData? 选择器的主题 CameraPicker.themeData(C.themeColor)
textDelegate CameraPickerTextDelegate? 控制部件中的文字实现 DefaultCameraPickerTextDelegate
resolutionPreset ResolutionPreset 相机的分辨率预设 ResolutionPreset.max
cameraQuarterTurns int 摄像机视图顺时针旋转次数,每次90度 0
imageFormatGroup ImageFormatGroup 输出图像的格式描述 ImageFormatGroup.unknown
foregroundBuilder Widget Function(CameraValue)? 覆盖在相机预览上方的前景构建 null
onEntitySaving SaveEntityCallback? 在查看器中保存图片时的回调 null

简单的使用方法

final AssetEntity? entity = await CameraPicker.pickFromCamera(context);

常见问题 💭

shouldLockPortrait 为 false 时为何有缩放问题?

当前旋转同步尚未支持。 当用户在旋转设备时,来自 CameraValueDeviceOrientation 与 Flutter 的不同。 在两者匹配时,缩放问题会消失。 Issue 链接:https://github.com/flutter/flutter/issues/78685

MIT License Copyright (c) 2020 AlexV525 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

clone from https://github.com/ihpcoder/flutter_wechat_camera_picker.git and custom changed 展开 收起
Dart
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
Dart
1
https://gitee.com/ffac/flutter_wechat_camera_picker.git
git@gitee.com:ffac/flutter_wechat_camera_picker.git
ffac
flutter_wechat_camera_picker
flutter_wechat_camera_picker
master

搜索帮助

53164aa7 5694891 3bd8fe86 5694891