[dynamic_color] Release build prints "Accent color detected." in console
PeterNjeim opened this issue · 1 comments
PeterNjeim commented
Package
dynamic_color
Existing issue?
- I checked the existing issues
What happened?
Expected vs actual result:
Expectation: nothing printed to console
Actuality: flutter: dynamic_color: Accent color detected.
printed to console
Steps to reproduce:
- Use
DynamicColorBuilder
- Build Linux release application
- Run binary
Notes
From this line in the code:
While it may seem like it does,debugPrint
doesn't mean "print only in debug mode", it means it "throttles the output to a level that avoids being dropped by Android’s kernel." Best practice is not to include prints in production in code, so I recommend deleting the lines that use debugPrint
in the dynamic_color
package, and possibly all non-error prints in the repository (maybe change this line: flutter-packages/analysis_options.yaml
Line 10 in 76e9f09
true
to make it easier).
Relevant log output
No response
guidezpl commented
Yeah, you would think debugPrint
only prints in debug mode. Easy fix