Flutter WeChat Camera Picker

A camera picker which is an extension for wechat_assets_picker. Based on camera for camera functions and photo_manager for asset implementation.

Features ✨

  • [x] 🔐 Non-nullable by default
  • [x] 💚 99% similar to WeChat style
  • [x] 📷 Picture taking support
    • [x] ☀️ Exposure adjust support
    • [x] 🔍️ Scale with pinch support
  • [x] 🎥 Video recording support
    • [x] ⏱ Duration limitation support
    • [x] 🔍 Scale when recording support
  • [x] 🖾 Foreground custom widget builder support

Screenshots 📸

68747470733a2f2f747661312e73696e61696d672e636e2f6c617267652f30303753385a496c677931676774743679726471656a333075303174303137772e6a7067 68747470733a2f2f747661312e73696e61696d672e636e2f6c617267652f30303753385a496c677931676774743679683378346a3330753031743077756f2e6a7067
68747470733a2f2f747661312e73696e61696d672e636e2f6c617267652f30303753385a496c67793167677474367a316837786a33307530317430316b782e6a7067 68747470733a2f2f747661312e73696e61696d672e636e2f6c617267652f30303753385a496c67793167677474367a617276686a333075303174307835662e6a7067

Preparing for use 🍭

Version constraints

Flutter SDK: >=2.0.0 .

Setup

Usage 📖

Name Type Description Default Value
enableRecording bool Whether the picker can record video. false
onlyEnableRecording bool Whether the picker can only record video. Only available when enableRecording is true. false
enableAudio bool Whether Whether the picker should record audio. Only available with recording. true
enableSetExposure bool Whether users can set the exposure point by tapping. true
enableExposureControlOnPoint bool Whether users can adjust exposure according to the set point. true
enablePinchToZoom bool Whether users can zoom the camera by pinch. true
enablePullToZoomInRecord bool Whether users can zoom by pulling up when recording video. true
shouldDeletePreviewFile bool Whether the preview file will be delete when pop. false
shouldLockPortrait bool Whether the orientation should be set to portrait true
maximumRecordingDuration Duration The maximum duration of the video recording process. const Duration(seconds: 15)
theme ThemeData? Theme data for the picker. CameraPicker.themeData(C.themeColor)
textDelegate CameraPickerTextDelegate? Text delegate that controls text in widgets. DefaultCameraPickerTextDelegate
resolutionPreset ResolutionPreset Present resolution for the camera. ResolutionPreset.max
cameraQuarterTurns int The number of clockwise quarter turns the camera view should be rotated. 0
imageFormatGroup ImageFormatGroup Describes the output of the raw image format. ImageFormatGroup.unknown
foregroundBuilder Widget Function(CameraValue)? The foreground widget builder which will cover the whole camera preview. null
onEntitySaving SaveEntityCallback? The callback type define for saving entity in the viewer. null

Simple usage

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

GitHub

https://github.com/fluttercandies/flutter_wechat_camera_picker