From 22424bbc71a3c96b6ca0e57c712a1f99c1ec4262 Mon Sep 17 00:00:00 2001 From: Vincent Velociter Date: Thu, 19 Dec 2024 15:13:29 +0100 Subject: [PATCH] Update version to 6.2.1 --- CHANGELOG.md | 6 ++++++ example/pubspec.lock | 2 +- lib/src/widgets/color_filter.dart | 6 +++--- pubspec.yaml | 2 +- 4 files changed, 11 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9435b72..0b03a8b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +## 6.2.1 + +- Improved the color filter +- Values of hue and brightness are now precised in the documentation +- `BrightnessHueFilter` widget is now exposed. + ## 6.2.0 - Add the possibility to change board colors diff --git a/example/pubspec.lock b/example/pubspec.lock index 5b0292e..1fbb53b 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -31,7 +31,7 @@ packages: path: ".." relative: true source: path - version: "6.2.0" + version: "6.2.1" clock: dependency: transitive description: diff --git a/lib/src/widgets/color_filter.dart b/lib/src/widgets/color_filter.dart index adf42a5..f3d00cd 100644 --- a/lib/src/widgets/color_filter.dart +++ b/lib/src/widgets/color_filter.dart @@ -46,7 +46,7 @@ class BrightnessHueFilter extends StatelessWidget { } List _brightnessFilter(List matrix, {required double value}) { - return multiplyMatrix5(matrix, [ + return _multiplyMatrix5(matrix, [ // dart format off value, 0, 0, 0, 0, 0, value, 0, 0, 0, @@ -66,7 +66,7 @@ List _hueFilter(List matrix, {required double value}) { const double lumG = 0.715; const double lumB = 0.072; - return multiplyMatrix5(matrix, [ + return _multiplyMatrix5(matrix, [ (lumR + (cosVal * (1 - lumR))) + (sinVal * (-lumR)), (lumG + (cosVal * (-lumG))) + (sinVal * (-lumG)), (lumB + (cosVal * (-lumB))) + (sinVal * (1 - lumB)), @@ -107,7 +107,7 @@ const List _baseMatrix = [ /// Check: https://github.com/openkraken/kraken/blob/main/kraken/lib/src/css/filter.dart /// Calc 5x5 matrix multiplication. -List multiplyMatrix5(List a, List b) { +List _multiplyMatrix5(List a, List b) { if (a.length != b.length) { throw ArgumentError('Matrix length should be same.'); } diff --git a/pubspec.yaml b/pubspec.yaml index 354d96d..9017714 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: chessground description: Chess board UI developed for lichess.org. It has no chess logic inside so it can be used for chess variants. -version: 6.2.0 +version: 6.2.1 repository: https://github.com/lichess-org/flutter-chessground funding: - https://lichess.org/patron