Skip to content

Commit

Permalink
Merge branch 'main' into fix/evict-precached-image
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexV525 authored Sep 7, 2024
2 parents 416b366 + 91b2ab6 commit ad11fa1
Show file tree
Hide file tree
Showing 30 changed files with 567 additions and 579 deletions.
45 changes: 44 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,59 @@ that can be found in the LICENSE file. -->

See the [Migration Guide](guides/migration_guide.md) for breaking changes between versions.

## Unreleased

- Evict the captured image cache once returned from the viewer.

## 4.3.2

### Fixes

- Fix button displays when tap to record.
- Prevent camera description exceptions when initializing the camera in the lifecycle callback.

### Improvements

- Use more precise overlay styles.
- Switching between different lens with a single camera by default.
- Always delete the preview file when popping from the preview.

## 4.3.1

### Improvements

- Downgrades the default resolution preset from `max` to `ultraHigh`.
- Improves pinch zooming experiences.
- Do not wait for focus mode and exposure mode to reset.
- Updates the capture actions section size to compatible with more cases.

## 4.3.0+1

### Fixes

- Fixes the breaking `ColorScheme.background` implementation on older Flutter SDKs.

## 4.3.0

### Improvements

- Adapt the latest interface of WeChat.

### Fixes

- Constraints `camera_android` version to resolves https://github.com/flutter/flutter/issues/150549.

## 4.2.2

### Fixes

- Allows `wrapControllerMethod` to return nullable result.
- Evict the captured image cache once returned from the viewer.
- Allows newer versions of `sensors_plus`.

### Improvements

- Provide the back button when no controller has been initialized.
- Improves paddings of the heading actions in the viewer.

## 4.2.1

Expand Down
1 change: 1 addition & 0 deletions CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @AlexV525
7 changes: 4 additions & 3 deletions README-ZH.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Language: [English](README.md) | 中文
基于 **微信 UI** 的 Flutter 相机选择器,可以单独运行,
同时是 [wechat_assets_picker][wechat_assets_picker pub] 的扩展。

当前的界面设计基于的微信版本:**8.3.x**
当前的界面设计基于的微信版本:**8.0.49**
界面更新将在微信版本更新后随时进行跟进。

查看 [迁移指南][] 了解如何从破坏性改动中迁移为可用代码。
Expand Down Expand Up @@ -188,13 +188,14 @@ final AssetEntity? entity = await CameraPicker.pickFromCamera(
| enableExposureControlOnPoint | `bool` | 用户是否可以根据已经设置的曝光点调节曝光度 | `true` |
| enablePinchToZoom | `bool` | 用户是否可以在界面上双指缩放相机对焦 | `true` |
| enablePullToZoomInRecord | `bool` | 用户是否可以在录制视频时上拉缩放 | `true` |
| enableScaledPreview | `bool` | 拍摄过程中相机预览是否需要缩放 | `false` |
| shouldDeletePreviewFile | `bool` | 返回页面时是否删除预览文件 | `false` |
| shouldAutoPreviewVideo | `bool` | 在预览时是否直接播放视频 | `false` |
| shouldAutoPreviewVideo | `bool` | 在预览时是否直接播放视频 | `true` |
| maximumRecordingDuration | `Duration?` | 录制视频最长时长 | `const Duration(seconds: 15)` |
| minimumRecordingDuration | `Duration` | 录制视频最短时长 | `const Duration(seconds: 1)` |
| theme | `ThemeData?` | 选择器的主题 | `CameraPicker.themeData(wechatThemeColor)` |
| textDelegate | `CameraPickerTextDelegate?` | 控制部件中的文字实现 | `CameraPickerTextDelegate` |
| resolutionPreset | `ResolutionPreset` | 相机的分辨率预设 | `ResolutionPreset.max` |
| resolutionPreset | `ResolutionPreset` | 相机的分辨率预设 | `ResolutionPreset.ultraHigh` |
| cameraQuarterTurns | `int` | 摄像机视图顺时针旋转次数,每次 90 度 | `0` |
| imageFormatGroup | `ImageFormatGroup` | 输出图像的格式描述 | `ImageFormatGroup.unknown` |
| preferredLensDirection | `CameraLensDirection` | 首次使用相机时首选的镜头方向 | `CameraLensDirection.back` |
Expand Down
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ A **camera picker** for Flutter projects based on WeChat's UI,
which is also a separate runnable extension to the
[wechat_assets_picker][wechat_assets_picker pub].

Current WeChat version that UI based on: **8.3.x**
Current WeChat version that UI based on: **8.0.49**
UI designs will be updated following the WeChat update in anytime.

See the [Migration Guide][] to learn how to migrate between breaking changes.
Expand Down Expand Up @@ -193,13 +193,14 @@ Fields in `CameraPickerConfig`:
| 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` |
| enableScaledPreview | `bool` | Whether the camera preview should be scaled during captures. | `false` |
| shouldDeletePreviewFile | `bool` | Whether the preview file will be delete when pop. | `false` |
| shouldAutoPreviewVideo | `bool` | Whether the video should be played instantly in the preview. | `false` |
| shouldAutoPreviewVideo | `bool` | Whether the video should be played instantly in the preview. | `true` |
| maximumRecordingDuration | `Duration?` | The maximum duration of the video recording process. | `const Duration(seconds: 15)` |
| minimumRecordingDuration | `Duration` | The minimum duration of the video recording process. | `const Duration(seconds: 1)` |
| theme | `ThemeData?` | Theme data for the picker. | `CameraPicker.themeData(wechatThemeColor)` |
| textDelegate | `CameraPickerTextDelegate?` | Text delegate that controls text in widgets. | `CameraPickerTextDelegate` |
| resolutionPreset | `ResolutionPreset` | Present resolution for the camera. | `ResolutionPreset.max` |
| resolutionPreset | `ResolutionPreset` | Present resolution for the camera. | `ResolutionPreset.ultraHigh` |
| 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` |
| preferredLensDirection | `CameraLensDirection` | Which lens direction is preferred when first using the camera. | `CameraLensDirection.back` |
Expand Down
24 changes: 22 additions & 2 deletions example/.metadata
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,27 @@
# This file should be version controlled and should not be manually edited.

version:
revision: 8af6b2f038c1172e61d418869363a28dffec3cb4
channel: stable
revision: "54e66469a933b60ddf175f858f82eaeb97e48c8d"
channel: "stable"

project_type: app

# Tracks metadata for the flutter migrate command
migration:
platforms:
- platform: root
create_revision: 54e66469a933b60ddf175f858f82eaeb97e48c8d
base_revision: 54e66469a933b60ddf175f858f82eaeb97e48c8d
- platform: ios
create_revision: 54e66469a933b60ddf175f858f82eaeb97e48c8d
base_revision: 54e66469a933b60ddf175f858f82eaeb97e48c8d

# User provided section

# List of Local paths (relative to this file) that should be
# ignored by the migrate tool.
#
# Files that are not part of the templates will be ignored by default.
unmanaged_files:
- 'lib/main.dart'
- 'ios/Runner.xcodeproj/project.pbxproj'
2 changes: 1 addition & 1 deletion example/android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.FLASHLIGHT" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" android:maxSdkVersion="29" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" android:maxSdkVersion="28" />

<uses-permission android:name="android.permission.READ_MEDIA_IMAGES" />
<uses-permission android:name="android.permission.READ_MEDIA_VIDEO" />
Expand Down
2 changes: 2 additions & 0 deletions example/ios/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
**/dgph
*.mode1v3
*.mode2v3
*.moved-aside
Expand All @@ -18,6 +19,7 @@ Flutter/App.framework
Flutter/Flutter.framework
Flutter/Flutter.podspec
Flutter/Generated.xcconfig
Flutter/ephemeral/
Flutter/app.flx
Flutter/app.zip
Flutter/flutter_assets/
Expand Down
2 changes: 1 addition & 1 deletion example/ios/Flutter/AppFrameworkInfo.plist
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<string>en</string>
<key>CFBundleExecutable</key>
<string>App</string>
<key>CFBundleIdentifier</key>
Expand Down
2 changes: 1 addition & 1 deletion example/ios/Flutter/Debug.xcconfig
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
#include "Generated.xcconfig"
2 changes: 1 addition & 1 deletion example/ios/Flutter/Release.xcconfig
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
#include "Generated.xcconfig"
Loading

0 comments on commit ad11fa1

Please sign in to comment.