From 8613fb89e611e13a4cb3eead8381bfdc14db9057 Mon Sep 17 00:00:00 2001 From: Alex Li Date: Fri, 21 Jun 2024 15:23:22 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=91=EF=B8=8F=20Fixes=20the=20breaking?= =?UTF-8?q?=20`ColorScheme.background`=20implementation=20on=20older=20Flu?= =?UTF-8?q?tter=20SDKs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 6 ++++++ example/pubspec.yaml | 2 +- lib/src/widgets/camera_picker.dart | 3 +++ pubspec.yaml | 2 +- 4 files changed, 11 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6c2d950..f8fef20 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,12 @@ that can be found in the LICENSE file. --> See the [Migration Guide](guides/migration_guide.md) for breaking changes between versions. +## 4.3.0+1 + +### Fixes + +- Fixes the breaking `ColorScheme.background` implementation on older Flutter SDKs. + ## 4.3.0 ### Improvements diff --git a/example/pubspec.yaml b/example/pubspec.yaml index dd1a648..eec4d0c 100644 --- a/example/pubspec.yaml +++ b/example/pubspec.yaml @@ -1,6 +1,6 @@ name: wechat_camera_picker_demo description: A new Flutter project. -version: 4.3.0+35 +version: 4.3.0+36 publish_to: none environment: diff --git a/lib/src/widgets/camera_picker.dart b/lib/src/widgets/camera_picker.dart index f6bcbed..b3b3a01 100644 --- a/lib/src/widgets/camera_picker.dart +++ b/lib/src/widgets/camera_picker.dart @@ -1,6 +1,7 @@ // Copyright 2019 The FlutterCandies author. All rights reserved. // Use of this source code is governed by an Apache license that can be found // in the LICENSE file. +// ignore_for_file: deprecated_member_use import 'dart:async'; @@ -92,12 +93,14 @@ class CameraPicker extends StatefulWidget { primaryContainer: Colors.grey[900], secondary: themeColor, secondaryContainer: themeColor, + background: Colors.grey[900]!, surface: Colors.grey[900]!, brightness: Brightness.dark, error: const Color(0xffcf6679), onPrimary: Colors.black, onSecondary: Colors.black, onSurface: Colors.white, + onBackground: Colors.white, onError: Colors.black, ), ); diff --git a/pubspec.yaml b/pubspec.yaml index e3898ee..9819749 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,5 +1,5 @@ name: wechat_camera_picker -version: 4.3.0 +version: 4.3.0+1 description: | A camera picker for Flutter projects based on WeChat's UI, which is also a separate runnable extension to the