Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version 2.0.1 #16

Merged
merged 3 commits into from
Apr 9, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Version 2.0.1
  • Loading branch information
rydmike committed Apr 9, 2021
commit ee7976b8defa44d4c2b3e700c667ce99d99d1388
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
name: Deploy Web
on:
push:
branches: [web-demo-experimental-feature]
branches: [none]
#release:
# types: [published]
# Edit and add other trigger options if an extra new Web deployment is needed.
Expand Down
19 changes: 9 additions & 10 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,20 @@ All notable changes to the **FlexColorPicker** package will be documented in thi

## [2.0.1] - April 10, 2021
* **New feature:** Enabled updating the color picker externally. Just set the `color` property of the widget to a
new value to update it and even "remote control" it, if so needed.
new value to update it. You can even "remote control" the color picker by updating the `color`, if so needed.

This is mostly a potential use-case for desktop/web when the picker is not used in a dialog.
You can of course can do this on a phone or tablet too, but often there is not room enough to use the picker
this way on mobile devices.
However, on desktops it is certainly a valid use case that should be supported. It was previously enabled,
but as we are going for full inclusion of web/desktop use-cases, it should certainly be supported.
This update adds support for it. The picker only updates if the externally provided
`color` constructor property differs from its internally kept color state. Finding the right picker, computing
the swatches, is a bit demanding, but it seems to work fluidly, even when remote controlling the wheel and sliders
interactively, at least on desktop and web builds.
You can of course use this on a phone or tablet too, but often there is not room enough to keep the picker
visible on the main surface this way on mobile devices. However, on desktops it is certainly a valid use
case that should be supported. It was previously not supported by design, but as we are going for covering
web/desktop use-cases, it should certainly be supported. This update adds support for it. The picker only
updates if the externally provided `color` constructor property differs from its internally kept color
state. Finding the right picker, computing its swatches, is a bit demanding, but it seems to work fluidly,
even when remote controlling the wheel and sliders interactively.

* **Web example**: Updated the Web example to also show the "remote control" of the on-screen color picker. A
remote control widget with a few color boxes, that you can click on to update its colors externally was added.
The demo even goes meta, and you can use a modal dialog version of the ColorPicker, to control the ColorPicker
The demo even goes meta! You can use a modal dialog version of the ColorPicker, to control the ColorPicker
on the screen in the card, from the dialog ColorPicker! Maybe not as such so useful, but an interesting demo.

## [2.0.0] - April 9, 2021
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -650,10 +650,10 @@ ColorPicker(
```

If you need to update the `ColorPicker` externally, just pass in a new value to the `color` property.
In the above example you could just give the state variable `myColor` a new value from some other place than
In the above example you could give the state variable `myColor` a new value from some other place than
the above `onColorChanged` callback, and call `setState`. The [live Web demo](https://rydmike.com/flexcolorpicker/)
includes an example of how you can update the `ColorPicker` from other widget interactions,
or even remote control it completely from another `ColorPicker` opened as a dialog.
includes an example of how you can update the `ColorPicker` via other widget interactions,
or even remote control, or mirror it completely from another **FlexColorPicker** opened as a dialog.

### Enabled Color Pickers

Expand Down
2 changes: 1 addition & 1 deletion example/lib/demo/utils/app.dart
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class App {
// Web demo with inside the app. Shown on the start screen in the demo,
// so people testing it don't have to ask. Also info for the About screen.
static const String appName = 'FlexColorPicker';
static const String version = '2.0.1 PRE';
static const String version = '2.0.1';
static const String packageVersion = 'FlexColorScheme package $version';
static const String packageUrl = 'https://pub.dev/packages/flex_color_picker';
static const String flutterVersion = 'Channel beta 2.1.0-12.2.pre, CanvasKit';
Expand Down
2 changes: 1 addition & 1 deletion example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ packages:
path: ".."
relative: true
source: path
version: "2.0.0"
version: "2.0.1"
flutter:
dependency: "direct main"
description: flutter
Expand Down