diff --git a/CHANGELOG.md b/CHANGELOG.md index e421691..1559682 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,11 @@ All notable changes to the **FlexColorPicker** package will be documented in this file. +## [1.1.5] - March 3, 2021 +* Bug fix `selectedPickerTypeColor`: When color was undefined, the thumb did not receive the same text color as the + default and only one before in version 1.1.3 and earlier, in dark-mode. This broke compatibility with past style + when using dark-mode. This fix restores the correct past style when the `selectedPickerTypeColor` is undefined. + ## [1.1.4] - March 3, 2021 * New property `selectedPickerTypeColor`: Defines the color of the thumb on the slider that shows the selected picker. * New property `colorCodePrefixStyle`: Defines the text style of the prefix for the color code. diff --git a/example/pubspec.lock b/example/pubspec.lock index 9c5773b..2823279 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -7,56 +7,56 @@ packages: name: async url: "https://pub.dartlang.org" source: hosted - version: "2.5.0" + version: "2.5.0-nullsafety.1" boolean_selector: dependency: transitive description: name: boolean_selector url: "https://pub.dartlang.org" source: hosted - version: "2.1.0" + version: "2.1.0-nullsafety.1" characters: dependency: transitive description: name: characters url: "https://pub.dartlang.org" source: hosted - version: "1.1.0" + version: "1.1.0-nullsafety.3" charcode: dependency: transitive description: name: charcode url: "https://pub.dartlang.org" source: hosted - version: "1.2.0" + version: "1.2.0-nullsafety.1" clock: dependency: transitive description: name: clock url: "https://pub.dartlang.org" source: hosted - version: "1.1.0" + version: "1.1.0-nullsafety.1" collection: dependency: transitive description: name: collection url: "https://pub.dartlang.org" source: hosted - version: "1.15.0" + version: "1.15.0-nullsafety.3" fake_async: dependency: transitive description: name: fake_async url: "https://pub.dartlang.org" source: hosted - version: "1.2.0" + version: "1.2.0-nullsafety.1" flex_color_picker: dependency: "direct main" description: path: ".." relative: true source: path - version: "1.1.4" + version: "1.1.5" flutter: dependency: "direct main" description: flutter @@ -73,21 +73,21 @@ packages: name: matcher url: "https://pub.dartlang.org" source: hosted - version: "0.12.10" + version: "0.12.10-nullsafety.1" meta: dependency: transitive description: name: meta url: "https://pub.dartlang.org" source: hosted - version: "1.3.0" + version: "1.3.0-nullsafety.3" path: dependency: transitive description: name: path url: "https://pub.dartlang.org" source: hosted - version: "1.8.0" + version: "1.8.0-nullsafety.1" sky_engine: dependency: transitive description: flutter @@ -99,55 +99,55 @@ packages: name: source_span url: "https://pub.dartlang.org" source: hosted - version: "1.8.1" + version: "1.8.0-nullsafety.2" stack_trace: dependency: transitive description: name: stack_trace url: "https://pub.dartlang.org" source: hosted - version: "1.10.0" + version: "1.10.0-nullsafety.1" stream_channel: dependency: transitive description: name: stream_channel url: "https://pub.dartlang.org" source: hosted - version: "2.1.0" + version: "2.1.0-nullsafety.1" string_scanner: dependency: transitive description: name: string_scanner url: "https://pub.dartlang.org" source: hosted - version: "1.1.0" + version: "1.1.0-nullsafety.1" term_glyph: dependency: transitive description: name: term_glyph url: "https://pub.dartlang.org" source: hosted - version: "1.2.0" + version: "1.2.0-nullsafety.1" test_api: dependency: transitive description: name: test_api url: "https://pub.dartlang.org" source: hosted - version: "0.2.19" + version: "0.2.19-nullsafety.2" typed_data: dependency: transitive description: name: typed_data url: "https://pub.dartlang.org" source: hosted - version: "1.3.0" + version: "1.3.0-nullsafety.3" vector_math: dependency: transitive description: name: vector_math url: "https://pub.dartlang.org" source: hosted - version: "2.1.0" + version: "2.1.0-nullsafety.3" sdks: - dart: ">=2.12.0-0.0 <3.0.0" + dart: ">=2.10.0-110 <2.11.0" diff --git a/example/pubspec.yaml b/example/pubspec.yaml index ea191e8..61bc329 100644 --- a/example/pubspec.yaml +++ b/example/pubspec.yaml @@ -1,12 +1,12 @@ name: color_picker_example description: Simple example of how to use the FlexColorPicker package. -version: 1.1.4 +version: 1.1.5 environment: sdk: ">=2.7.0 <3.0.0" dependencies: - flex_color_picker: ^1.1.4 + flex_color_picker: ^1.1.5 flutter: sdk: flutter diff --git a/example/windows/flutter/CMakeLists.txt b/example/windows/flutter/CMakeLists.txt index c7a8c76..744f08a 100644 --- a/example/windows/flutter/CMakeLists.txt +++ b/example/windows/flutter/CMakeLists.txt @@ -91,6 +91,7 @@ add_custom_command( ${FLUTTER_TOOL_ENVIRONMENT} "${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.bat" windows-x64 $ + VERBATIM ) add_custom_target(flutter_assemble DEPENDS "${FLUTTER_LIBRARY}" diff --git a/lib/src/color_picker.dart b/lib/src/color_picker.dart index 504254a..2a26a17 100644 --- a/lib/src/color_picker.dart +++ b/lib/src/color_picker.dart @@ -764,9 +764,11 @@ class _ColorPickerState extends State { color: Color(0xFFFFFFFF), darkColor: Color(0xFF636366), ); + // Define thumb onColor based on thumb color brightness. - final Color _thumbOnColor = - ThemeData.estimateBrightnessForColor(_thumbColor) == Brightness.light + final Color _thumbOnColor = widget.selectedPickerTypeColor == null + ? null + : ThemeData.estimateBrightnessForColor(_thumbColor) == Brightness.light ? Colors.black : Colors.white; diff --git a/pubspec.yaml b/pubspec.yaml index c25d838..708b68b 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: flex_color_picker description: A customizable Flutter primary, accent and custom color picker. Includes an optional HSV wheel color picker. -version: 1.1.4 +version: 1.1.5 homepage: https://github.com/rydmike/flex_color_picker environment: