-
Notifications
You must be signed in to change notification settings - Fork 11
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome!
A few things missing:
- I think it's worth it to update the README usage section. I would mention Android in what's there currently, and then add a link to the
accent_color.dart
example:
## Usage
See this [complete example] for obtaining dynamic colors on Android, creating
harmonized color schemes, and harmonizing custom colors.
See this [example] for obtaining the macOS/Windows accent color.
- CHANGELOG and pubspec need a minor version bump
- Update the
dynamic_color_builder_test.dart
test
windows/dynamic_color_plugin.cpp
Outdated
void DynamicColorPlugin::HandleMethodCall( | ||
const flutter::MethodCall<flutter::EncodableValue> &method_call, | ||
std::unique_ptr<flutter::MethodResult<flutter::EncodableValue>> result) { | ||
if (method_call.method_name().compare("getControlAccentColor") == 0) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (method_call.method_name().compare("getControlAccentColor") == 0) { | |
if (method_call.method_name().compare("getAccentColor") == 0) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you like to rename the one in macOS plugin also?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, with plugins, a single API for multiple platforms is always better.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed, just something to think about in the future, do you like the idea of providing it for the Android one also, maybe it can reuse accent1_500.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, with plugins, a single API for multiple platforms is always better.
Done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, thought about it, but there's no prescribed accent color for Android. I do think there's an optimization to be made for this package's users, who just want a color scheme per platform, and don't care whether it came from a single color (macOS/Windows) or is some intermediate form (Android's CorePalette
).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What am I saying, that's what DynamicColorBuilder
is. 😄
Done, hopefully. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great, thanks for getting this done.
Follow up to material-foundation/flutter-packages#338
Fixes material-foundation/flutter-packages#337