Skip to content

Commit

Permalink
🔖 3.6.0 (#133)
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexV525 authored Sep 19, 2022
1 parent 6e01656 commit 52bbcf4
Show file tree
Hide file tree
Showing 8 changed files with 50 additions and 12 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@ that can be found in the LICENSE file. -->

# Changelog

## 3.6.0

### New features

- Upgrade `camera` to `0.10.x`. (#133)
- Upgrade `photo_maanger` for Android 13. (#133)

## 3.5.0+1

### Fixes
Expand Down
15 changes: 15 additions & 0 deletions README-ZH.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,21 @@ Flutter SDK:`>=2.0.0` 。
- [wechat_assets_picker#准备工作](https://github.com/fluttercandies/flutter_wechat_assets_picker/blob/master/README-ZH.md#preparing-for-use-)
- [camera#installation](https://pub.flutter-io.cn/packages/camera#installation)

#### Android 13 (API 33) 权限配置

如果你不需要拍照或录像,你可以考虑将对应权限移除:

```xml
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.your.app">
<!-- 如果不需要拍照,移除 READ_MEDIA_IMAGES -->
<uses-permission android:name="android.permission.READ_MEDIA_IMAGES" tools:node="remove" />
<!-- 如果不需要拍照,移除 READ_MEDIA_VIDEO -->
<uses-permission android:name="android.permission.READ_MEDIA_VIDEO" tools:node="remove" />
</manifest>
```

## 使用方法 📖

### 简单的使用方法
Expand Down
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,22 @@ Flutter SDK: `>=2.0.0` .
- [wechat_assets_picker#preparing-for-use](https://github.com/fluttercandies/flutter_wechat_assets_picker#preparing-for-use-)
- [camera#installation](https://pub.dev/packages/camera#installation)

#### Android 13 (API 33) permissions

If you don't need to take photos or videos,
consider removing relevant permission in your apps, more specifically:

```xml
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.your.app">
<!-- Remove READ_MEDIA_IMAGES if you don't need to take photos. -->
<uses-permission android:name="android.permission.READ_MEDIA_IMAGES" tools:node="remove" />
<!-- Remove READ_MEDIA_VIDEO if you don't need to take videos. -->
<uses-permission android:name="android.permission.READ_MEDIA_VIDEO" tools:node="remove" />
</manifest>
```

## Usage 📖

### Simple usage
Expand Down
4 changes: 2 additions & 2 deletions example/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ apply plugin: 'kotlin-kapt'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

android {
compileSdkVersion flutter.compileSdkVersion
compileSdkVersion 33

sourceSets {
main.java.srcDirs += 'src/main/kotlin'
Expand All @@ -40,7 +40,7 @@ android {
defaultConfig {
applicationId "com.fluttercandies.wechatCameraPickerExample"
minSdkVersion 21
targetSdkVersion flutter.targetSdkVersion
targetSdkVersion 33
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
}
Expand Down
3 changes: 3 additions & 0 deletions example/android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
<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.READ_MEDIA_IMAGES" />
<uses-permission android:name="android.permission.READ_MEDIA_VIDEO" />

<uses-feature
android:name="android.hardware.camera"
android:required="true"/>
Expand Down
2 changes: 1 addition & 1 deletion example/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: wechat_camera_picker_demo
description: A new Flutter project.
version: 3.5.0+15
version: 3.6.0+16
publish_to: none

environment:
Expand Down
9 changes: 3 additions & 6 deletions lib/src/states/camera_picker_viewer_state.dart
Original file line number Diff line number Diff line change
Expand Up @@ -205,14 +205,11 @@ class CameraPickerViewerState extends State<CameraPickerViewer> {
iconSize: 18,
icon: Container(
padding: const EdgeInsets.all(5),
decoration: BoxDecoration(
color: Theme.of(context).iconTheme.color,
decoration: const BoxDecoration(
color: Colors.white,
shape: BoxShape.circle,
),
child: Icon(
Icons.keyboard_return_rounded,
color: Theme.of(context).canvasColor,
),
child: const Icon(Icons.keyboard_return_rounded, color: Colors.black,),
),
),
),
Expand Down
6 changes: 3 additions & 3 deletions pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: wechat_camera_picker
description: A camera picker which is an extension to wechat_assets_picker, but can be run separately.
version: 3.5.0+1
version: 3.6.0
homepage: https://github.com/fluttercandies/flutter_wechat_camera_picker

environment:
Expand All @@ -11,8 +11,8 @@ dependencies:
flutter:
sdk: flutter

camera: ^0.9.6
camera: ^0.10.0
camera_platform_interface: ^2.1.5
path: ^1.8.0
photo_manager: ^2.2.0
photo_manager: ^2.3.0
video_player: ^2.3.2

0 comments on commit 52bbcf4

Please sign in to comment.