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 ��
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);
Comments are closed.