[web] Cleanup unused shadow stuff#186681
Conversation
There was a problem hiding this comment.
Code Review
This pull request removes the engine/shadow.dart utility file and its corresponding export from the web engine. In canvaskit_api_test.dart, the constants kLightHeight and kLightRadius were replaced with literal magic numbers. Feedback was provided to define these values as named constants to improve maintainability and adhere to the style guide's recommendation against magic numbers.
| ..[2] = devicePixelRatio * 600.0, | ||
| devicePixelRatio * 800.0, |
There was a problem hiding this comment.
To improve readability and maintainability, it's better to avoid magic numbers. Please define 600.0 and 800.0 as named constants with descriptive names (e.g., kLightHeight and kLightRadius) at the top of the file or within the test group. This aligns with the 'Effective Dart: Style' guide's recommendation to avoid magic numbers.
| ..[2] = devicePixelRatio * 600.0, | |
| devicePixelRatio * 800.0, | |
| ..[2] = devicePixelRatio * kLightHeight, | |
| devicePixelRatio * kLightRadius, |
References
- The repository style guide (line 20) defers to 'Effective Dart: Style', which recommends avoiding magic numbers for better code readability and maintainability. (link)
No description provided.