Skip to content

[web] Cleanup unused shadow stuff#186681

Merged
auto-submit[bot] merged 2 commits into
flutter:masterfrom
mdebbar:unused_shadows
May 20, 2026
Merged

[web] Cleanup unused shadow stuff#186681
auto-submit[bot] merged 2 commits into
flutter:masterfrom
mdebbar:unused_shadows

Conversation

@mdebbar
Copy link
Copy Markdown
Contributor

@mdebbar mdebbar commented May 18, 2026

No description provided.

@flutter-dashboard flutter-dashboard Bot added the CICD Run CI/CD label May 18, 2026
@github-actions github-actions Bot added engine flutter/engine related. See also e: labels. platform-web Web applications specifically labels May 18, 2026
@github-actions github-actions Bot removed the CICD Run CI/CD label May 19, 2026
@mdebbar mdebbar added the CICD Run CI/CD label May 19, 2026
@mdebbar mdebbar marked this pull request as ready for review May 20, 2026 15:47
@mdebbar mdebbar requested a review from harryterkelsen May 20, 2026 15:47
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment on lines +1287 to +1288
..[2] = devicePixelRatio * 600.0,
devicePixelRatio * 800.0,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

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.

Suggested change
..[2] = devicePixelRatio * 600.0,
devicePixelRatio * 800.0,
..[2] = devicePixelRatio * kLightHeight,
devicePixelRatio * kLightRadius,
References
  1. The repository style guide (line 20) defers to 'Effective Dart: Style', which recommends avoiding magic numbers for better code readability and maintainability. (link)

Copy link
Copy Markdown
Contributor

@harryterkelsen harryterkelsen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@mdebbar mdebbar added the autosubmit Merge PR when tree becomes green via auto submit App label May 20, 2026
@auto-submit auto-submit Bot added this pull request to the merge queue May 20, 2026
Merged via the queue into flutter:master with commit de0f18f May 20, 2026
200 of 201 checks passed
@flutter-dashboard flutter-dashboard Bot removed the autosubmit Merge PR when tree becomes green via auto submit App label May 20, 2026
matthewhendrix pushed a commit to matthewhendrix/flutter that referenced this pull request May 23, 2026
@mdebbar mdebbar deleted the unused_shadows branch May 26, 2026 19:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CICD Run CI/CD engine flutter/engine related. See also e: labels. platform-web Web applications specifically

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants