-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Add the palette_generator package to the packages repo #2
Conversation
eddc4c5
to
d055aff
Compare
be0a65a
to
6b14c98
Compare
This is ready for review. The people who requested this would like it comitted by Wednesday if at all possible. |
98ad172
to
14f3c9e
Compare
14f3c9e
to
fe34390
Compare
fe34390
to
dc6a3af
Compare
|
||
//import 'package:palette_generator/palette_generator.dart'; | ||
|
||
//import 'package:flutter/gestures.dart'; |
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.
commented out code?
label: 'Light Muted', color: generator.lightMutedColor?.color), | ||
new PaletteSwatch(label: 'Muted', color: generator.mutedColor?.color), | ||
new PaletteSwatch( | ||
label: 'Dark Muted', color: generator.darkMutedColor?.color), |
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.
having some of these wrapped and some not makes this hard to read
|
||
/// Returns a muted and dark color from the palette. Might be null if an | ||
/// appropriate target color could not be found. | ||
PaletteColor get darkMutedColor => selectedSwatches[PaletteTarget.darkMuted]; |
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.
ditto with the inconsistent wrapping
hslColor.saturation <= target.maximumSaturation && | ||
hslColor.lightness >= target.minimumLightness && | ||
hslColor.lightness <= target.maximumLightness && | ||
!usedColors.contains(paletteColor.color); |
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.
inconsistent indentation
maximumLightness == other.maximumLightness && | ||
saturationWeight == other.saturationWeight && | ||
lightnessWeight == other.lightnessWeight && | ||
populationWeight == other.populationWeight; |
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.
ditto
I left the indentation issues because this repo has the dartfmt presubmit check turned on like flutter/plugins does (and so I can't change those without putting in a formatting exception comment). |
…into palette_generator
10c9b3e
to
561164f
Compare
Bump version
Update .gitignore to new `dart_tool` pub cache
last update
* Refactor internal classes and methods - Separate matching from redirection - Add RouteRedirector typedef - Add RouteMatcher class - Add RouteBuilder class - Add RouteConfiguration class - Rename and reorganize internal classes and libraries - Add todo comments * format * Sort imports * Update changelog * Address code review comments - Change name back to GoRouterRefreshStream - Update toString() methods for new naming - Make fields final - Add logging to parser - Add comments - add tests - Move function-scope to new library-scope _addRedirect function - import widgets instead of material where possible * remove routing library * Move classes in go_router.dart into separate libraries * Move Configuration.validate() into constructor * Remove comment * use continue in redirect loop * Fix comments * Sort imports * Fix logging in configuration * add visibleForTesting annotation * Updates from merge with main * Format * Add TODOs to make Router implementation classes private * Add copyright headers * Fix tests * format * fix comment * Update packages/go_router/lib/src/parser.dart Co-authored-by: Loïc Sharma <737941+loic-sharma@users.noreply.github.com> * add whitespace * format * Hide typedefs that weren't previously exported * Delete empty file * add missing import * Specify version 4.1.2 in pubspec.yaml * Update packages/go_router/lib/src/builder.dart Co-authored-by: chunhtai <47866232+chunhtai@users.noreply.github.com> * Fix comment * Add isError and error getters to RouteMatchList * Add issue links to TODO comments * Add link to issue for TODO * Re-apply code from #2306 due to merge conflicts * Add issue references Co-authored-by: Loïc Sharma <737941+loic-sharma@users.noreply.github.com> Co-authored-by: chunhtai <47866232+chunhtai@users.noreply.github.com>
flutter/flutter@fe0275f...ad20089 2023-10-06 engine-flutter-autoroll@skia.org Roll Flutter Engine from cc9bc9e2c0d3 to 59b6b94e1a51 (1 revision) (flutter/flutter#136066) 2023-10-06 sokolovskyi.konstantin@gmail.com Fix memory leaks in DateRangePickerDialog. (flutter/flutter#136034) 2023-10-06 engine-flutter-autoroll@skia.org Roll Flutter Engine from 6492e1f8c315 to cc9bc9e2c0d3 (1 revision) (flutter/flutter#136062) 2023-10-06 5236035+fzyzcjy@users.noreply.github.com Tiny improve code style by using records instead of lists (flutter/flutter#135886) 2023-10-05 engine-flutter-autoroll@skia.org Roll Flutter Engine from 27a674466094 to 6492e1f8c315 (1 revision) (flutter/flutter#136052) 2023-10-05 smartercallum@gmail.com Upload frame_request_pending_latency [attempt #2] (flutter/flutter#135890) 2023-10-05 engine-flutter-autoroll@skia.org Roll Flutter Engine from 0ff05464f42f to 27a674466094 (1 revision) (flutter/flutter#136050) 2023-10-05 engine-flutter-autoroll@skia.org Roll Flutter Engine from ad83202a59a6 to 0ff05464f42f (1 revision) (flutter/flutter#136047) 2023-10-05 engine-flutter-autoroll@skia.org Roll Flutter Engine from f8d53c5fe9f2 to ad83202a59a6 (2 revisions) (flutter/flutter#136040) 2023-10-05 engine-flutter-autoroll@skia.org Roll Packages from d654f75 to 6714d50 (3 revisions) (flutter/flutter#136039) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages Please CC rmistry@google.com,stuartmorgan@google.com,ychris@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
flutter/flutter@5207a30...f52fe4f 2023-10-09 41873024+droidbg@users.noreply.github.com [leak-tracking] Add leak tracking in test/painting #2 (flutter/flutter#136169) 2023-10-09 engine-flutter-autoroll@skia.org Roll Flutter Engine from 2886353ee612 to 664f5e833871 (1 revision) (flutter/flutter#136195) 2023-10-09 tessertaha@gmail.com Fix `flutter drive` instructions in `Macrobenchmark` README (flutter/flutter#135990) 2023-10-09 tessertaha@gmail.com Update `CircleAvatar` & `DataTable` tests for Material 3 (flutter/flutter#135901) 2023-10-09 engine-flutter-autoroll@skia.org Roll Flutter Engine from 69ffbd18ab5e to 2886353ee612 (1 revision) (flutter/flutter#136187) 2023-10-09 engine-flutter-autoroll@skia.org Roll Flutter Engine from 53da096c0c38 to 69ffbd18ab5e (2 revisions) (flutter/flutter#136186) 2023-10-09 engine-flutter-autoroll@skia.org Roll Flutter Engine from e58a9b3c54b6 to 53da096c0c38 (2 revisions) (flutter/flutter#136182) 2023-10-09 leroux_bruno@yahoo.fr Update BottomSheet test for M3 + fix an issue in elevation resolution (flutter/flutter#136071) 2023-10-09 engine-flutter-autoroll@skia.org Roll Flutter Engine from 7b8f5d4297c6 to e58a9b3c54b6 (1 revision) (flutter/flutter#136175) 2023-10-09 engine-flutter-autoroll@skia.org Roll Flutter Engine from d5485d67b9f9 to 7b8f5d4297c6 (1 revision) (flutter/flutter#136168) 2023-10-08 engine-flutter-autoroll@skia.org Roll Flutter Engine from 34ffdf06ca93 to d5485d67b9f9 (1 revision) (flutter/flutter#136158) 2023-10-08 engine-flutter-autoroll@skia.org Roll Flutter Engine from 0785e3c69f7c to 34ffdf06ca93 (1 revision) (flutter/flutter#136156) 2023-10-08 engine-flutter-autoroll@skia.org Roll Flutter Engine from 03c8c7724873 to 0785e3c69f7c (2 revisions) (flutter/flutter#136150) 2023-10-08 engine-flutter-autoroll@skia.org Roll Flutter Engine from eb88bb5b5c4b to 03c8c7724873 (1 revision) (flutter/flutter#136147) 2023-10-08 engine-flutter-autoroll@skia.org Roll Flutter Engine from 46b05f69187d to eb88bb5b5c4b (1 revision) (flutter/flutter#136145) 2023-10-07 engine-flutter-autoroll@skia.org Roll Flutter Engine from a18c52768bbc to 46b05f69187d (1 revision) (flutter/flutter#136142) 2023-10-07 engine-flutter-autoroll@skia.org Roll Flutter Engine from 8711c1fd2191 to a18c52768bbc (6 revisions) (flutter/flutter#136141) 2023-10-07 polinach@google.com Allow leaks around tap down/up, while flackiness is not fixed. (flutter/flutter#136133) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages Please CC rmistry@google.com,stuartmorgan@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
flutter/flutter@fe0275f...ad20089 2023-10-06 engine-flutter-autoroll@skia.org Roll Flutter Engine from cc9bc9e2c0d3 to 59b6b94e1a51 (1 revision) (flutter/flutter#136066) 2023-10-06 sokolovskyi.konstantin@gmail.com Fix memory leaks in DateRangePickerDialog. (flutter/flutter#136034) 2023-10-06 engine-flutter-autoroll@skia.org Roll Flutter Engine from 6492e1f8c315 to cc9bc9e2c0d3 (1 revision) (flutter/flutter#136062) 2023-10-06 5236035+fzyzcjy@users.noreply.github.com Tiny improve code style by using records instead of lists (flutter/flutter#135886) 2023-10-05 engine-flutter-autoroll@skia.org Roll Flutter Engine from 27a674466094 to 6492e1f8c315 (1 revision) (flutter/flutter#136052) 2023-10-05 smartercallum@gmail.com Upload frame_request_pending_latency [attempt flutter#2] (flutter/flutter#135890) 2023-10-05 engine-flutter-autoroll@skia.org Roll Flutter Engine from 0ff05464f42f to 27a674466094 (1 revision) (flutter/flutter#136050) 2023-10-05 engine-flutter-autoroll@skia.org Roll Flutter Engine from ad83202a59a6 to 0ff05464f42f (1 revision) (flutter/flutter#136047) 2023-10-05 engine-flutter-autoroll@skia.org Roll Flutter Engine from f8d53c5fe9f2 to ad83202a59a6 (2 revisions) (flutter/flutter#136040) 2023-10-05 engine-flutter-autoroll@skia.org Roll Packages from d654f75 to 6714d50 (3 revisions) (flutter/flutter#136039) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages Please CC rmistry@google.com,stuartmorgan@google.com,ychris@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
flutter/flutter@5207a30...f52fe4f 2023-10-09 41873024+droidbg@users.noreply.github.com [leak-tracking] Add leak tracking in test/painting flutter#2 (flutter/flutter#136169) 2023-10-09 engine-flutter-autoroll@skia.org Roll Flutter Engine from 2886353ee612 to 664f5e833871 (1 revision) (flutter/flutter#136195) 2023-10-09 tessertaha@gmail.com Fix `flutter drive` instructions in `Macrobenchmark` README (flutter/flutter#135990) 2023-10-09 tessertaha@gmail.com Update `CircleAvatar` & `DataTable` tests for Material 3 (flutter/flutter#135901) 2023-10-09 engine-flutter-autoroll@skia.org Roll Flutter Engine from 69ffbd18ab5e to 2886353ee612 (1 revision) (flutter/flutter#136187) 2023-10-09 engine-flutter-autoroll@skia.org Roll Flutter Engine from 53da096c0c38 to 69ffbd18ab5e (2 revisions) (flutter/flutter#136186) 2023-10-09 engine-flutter-autoroll@skia.org Roll Flutter Engine from e58a9b3c54b6 to 53da096c0c38 (2 revisions) (flutter/flutter#136182) 2023-10-09 leroux_bruno@yahoo.fr Update BottomSheet test for M3 + fix an issue in elevation resolution (flutter/flutter#136071) 2023-10-09 engine-flutter-autoroll@skia.org Roll Flutter Engine from 7b8f5d4297c6 to e58a9b3c54b6 (1 revision) (flutter/flutter#136175) 2023-10-09 engine-flutter-autoroll@skia.org Roll Flutter Engine from d5485d67b9f9 to 7b8f5d4297c6 (1 revision) (flutter/flutter#136168) 2023-10-08 engine-flutter-autoroll@skia.org Roll Flutter Engine from 34ffdf06ca93 to d5485d67b9f9 (1 revision) (flutter/flutter#136158) 2023-10-08 engine-flutter-autoroll@skia.org Roll Flutter Engine from 0785e3c69f7c to 34ffdf06ca93 (1 revision) (flutter/flutter#136156) 2023-10-08 engine-flutter-autoroll@skia.org Roll Flutter Engine from 03c8c7724873 to 0785e3c69f7c (2 revisions) (flutter/flutter#136150) 2023-10-08 engine-flutter-autoroll@skia.org Roll Flutter Engine from eb88bb5b5c4b to 03c8c7724873 (1 revision) (flutter/flutter#136147) 2023-10-08 engine-flutter-autoroll@skia.org Roll Flutter Engine from 46b05f69187d to eb88bb5b5c4b (1 revision) (flutter/flutter#136145) 2023-10-07 engine-flutter-autoroll@skia.org Roll Flutter Engine from a18c52768bbc to 46b05f69187d (1 revision) (flutter/flutter#136142) 2023-10-07 engine-flutter-autoroll@skia.org Roll Flutter Engine from 8711c1fd2191 to a18c52768bbc (6 revisions) (flutter/flutter#136141) 2023-10-07 polinach@google.com Allow leaks around tap down/up, while flackiness is not fixed. (flutter/flutter#136133) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages Please CC rmistry@google.com,stuartmorgan@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
flutter/flutter@538e742...fa402c8 2024-09-26 engine-flutter-autoroll@skia.org Roll Flutter Engine from 6328a0597b68 to 9e6133e8d906 (1 revision) (flutter/flutter#155762) 2024-09-26 engine-flutter-autoroll@skia.org Roll Packages from 7da2374 to f38b780 (2 revisions) (flutter/flutter#155760) 2024-09-26 49699333+dependabot[bot]@users.noreply.github.com Bump codecov/codecov-action from 4.4.1 to 4.5.0 (flutter/flutter#150229) 2024-09-26 engine-flutter-autoroll@skia.org Roll Flutter Engine from 08f935236e45 to 6328a0597b68 (1 revision) (flutter/flutter#155750) 2024-09-26 engine-flutter-autoroll@skia.org Roll Flutter Engine from 3a520a2a4399 to 08f935236e45 (1 revision) (flutter/flutter#155748) 2024-09-26 kustermann@google.com Reland "[flutter_tools] Cleanup of native asset related code (removes around 50% of the native asset related code) (#155430)" (flutter/flutter#155745) 2024-09-26 engine-flutter-autoroll@skia.org Roll Flutter Engine from 896208ee5828 to 3a520a2a4399 (1 revision) (flutter/flutter#155744) 2024-09-26 engine-flutter-autoroll@skia.org Roll Flutter Engine from fc6c85292b57 to 896208ee5828 (2 revisions) (flutter/flutter#155743) 2024-09-26 engine-flutter-autoroll@skia.org Roll Flutter Engine from 3719454a879f to fc6c85292b57 (1 revision) (flutter/flutter#155738) 2024-09-26 captainsikandar47@gmail.com added ability to configure shadow in banner (flutter/flutter#155296) 2024-09-26 engine-flutter-autoroll@skia.org Roll Flutter Engine from d4850c1ae648 to 3719454a879f (1 revision) (flutter/flutter#155736) 2024-09-26 engine-flutter-autoroll@skia.org Roll Flutter Engine from d6d5fdba6ae1 to d4850c1ae648 (18 revisions) (flutter/flutter#155733) 2024-09-25 robert.ancell@canonical.com Move the Linux runner into a subdirectory (flutter/flutter#153812) 2024-09-25 49699333+dependabot[bot]@users.noreply.github.com Bump actions/checkout from 4.1.7 to 4.2.0 (flutter/flutter#155711) 2024-09-25 98614782+auto-submit[bot]@users.noreply.github.com Reverts "[flutter_tools] Cleanup of native asset related code (removes around 50% of the native asset related code) (#155430)" (flutter/flutter#155713) 2024-09-25 kustermann@google.com [flutter_tools] Cleanup of native asset related code (removes around 50% of the native asset related code) (flutter/flutter#155430) 2024-09-25 mohellebiabdessalem@gmail.com reduce warnings inside flutter.groovy file #2 (flutter/flutter#155628) 2024-09-25 43054281+camsim99@users.noreply.github.com [Android] Update `SystemUiMode` and `setSystemChromeEnabledSystemUIMode ` docs to note targeting Android 15+ change (flutter/flutter#153466) 2024-09-25 christopherfujino@gmail.com mark linux packages autoroller bringup: true (flutter/flutter#155705) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages Please CC louisehsu@google.com,stuartmorgan@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
add basic vector graphics asset
Some more tweaks!
Reverts #6749 This is failing the publish step: ``` Running 'build_and_copy' in shared_preferences_tool [build_and_copy] Building the extension Flutter web app... Could not find an option named "--web-renderer". Run 'flutter -h' (or 'flutter <command> -h') for available flutter commands and options. Unhandled exception: ProcessException: Failed with exit code: 64 Command: flutter build web --web-renderer canvaskit --pwa-strategy=offline-first --release --no-tree-shake-icons #0 BuildExtensionCommand._runProcess (file:///b/s/w/ir/x/w/.pub-cache/hosted/pub.dev/devtools_extensions-0.2.2/bin/_build_and_copy.dart:134:7) <asynchronous suspension> #1 BuildExtensionCommand.run (file:///b/s/w/ir/x/w/.pub-cache/hosted/pub.dev/devtools_extensions-0.2.2/bin/_build_and_copy.dart:57:5) <asynchronous suspension> #2 CommandRunner.runCommand (package:args/command_runner.dart:212:13) <asynchronous suspension> #3 SharedStdIn.terminate (package:io/src/shared_stdin.dart:91:3) <asynchronous suspension> #4 main (file:///b/s/w/ir/x/w/.pub-cache/hosted/pub.dev/devtools_extensions-0.2.2/bin/devtools_extensions.dart:16:3) <asynchronous suspension> ```
This adds a palette generator that will take an image and generate a set of distinct, dominant colors from it. This is more or less a port of the Android Palette class, except that it doesn't automatically resize the image if it is too large.
Where the first (top left below the image) color is the more prominent distinct color, and the last is the least. It can select various target colors from the available colors based on targets that it is given (and has several default targets it looks for).
The screenshot above is from the sample app that shows how to use it, and lets the user select a region of the image to take the palette from.
[Also, this PR includes the CI PR #1, but I'll merge and resolve that before committing this one.]