Skip to content

Commit

Permalink
Update version to 6.2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
veloce committed Dec 19, 2024
1 parent 5c903ae commit 22424bb
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 5 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ packages:
path: ".."
relative: true
source: path
version: "6.2.0"
version: "6.2.1"
clock:
dependency: transitive
description:
Expand Down
6 changes: 3 additions & 3 deletions lib/src/widgets/color_filter.dart
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class BrightnessHueFilter extends StatelessWidget {
}

List<double> _brightnessFilter(List<double> matrix, {required double value}) {
return multiplyMatrix5(matrix, <double>[
return _multiplyMatrix5(matrix, <double>[
// dart format off
value, 0, 0, 0, 0,
0, value, 0, 0, 0,
Expand All @@ -66,7 +66,7 @@ List<double> _hueFilter(List<double> matrix, {required double value}) {
const double lumG = 0.715;
const double lumB = 0.072;

return multiplyMatrix5(matrix, <double>[
return _multiplyMatrix5(matrix, <double>[
(lumR + (cosVal * (1 - lumR))) + (sinVal * (-lumR)),
(lumG + (cosVal * (-lumG))) + (sinVal * (-lumG)),
(lumB + (cosVal * (-lumB))) + (sinVal * (1 - lumB)),
Expand Down Expand Up @@ -107,7 +107,7 @@ const List<double> _baseMatrix = [

/// Check: https://github.com/openkraken/kraken/blob/main/kraken/lib/src/css/filter.dart
/// Calc 5x5 matrix multiplication.
List<double> multiplyMatrix5(List<double> a, List<double> b) {
List<double> _multiplyMatrix5(List<double> a, List<double> b) {
if (a.length != b.length) {
throw ArgumentError('Matrix length should be same.');
}
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit 22424bb

Please sign in to comment.