Skip to content

Conversation

@tvolkert
Copy link
Contributor

  1. Make BoxShadow.toPaint() add a stroke so that we can see where
    shadows would have otherwise been painted.
  2. Make CupertinoSwitch use BoxShadow.toPaint() so that it respects
    the debugDisableShadows flag.

1. Make BoxShadow.toPaint() add a stroke so that we can see where
   shadows would have otherwise been painted.
2. Make CupertinoSwitch use BoxShadow.toPaint() so that it respects
   the `debugDisableShadows` flag.
tvolkert added a commit to flutter/goldens that referenced this pull request May 14, 2018
@tvolkert tvolkert requested a review from Hixie May 14, 2018 17:21
new Radius.circular(rect.shortestSide / 2.0),
);

final Paint shadowPaint = new BoxShadow(
Copy link
Contributor

Choose a reason for hiding this comment

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

let's create that in the constructor

Copy link
Contributor

Choose a reason for hiding this comment

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

this still applies :-)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Weird - hadn't seen this before. Done.

result.maskFilter = null;
if (debugDisableShadows) {
result
..maskFilter = null;
Copy link
Contributor

Choose a reason for hiding this comment

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

i assume you meant to revert this :-)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yep - done

final Color shadowColor;

/// The paint used to draw the shadow case by the thumb.
Paint _shadowPaint;
Copy link
Contributor

Choose a reason for hiding this comment

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

this can be final if you set it in the constructor initialiser list

@Hixie
Copy link
Contributor

Hixie commented May 15, 2018

LGTM

@tvolkert
Copy link
Contributor Author

Merging on red because the redness is a suspected flake that we're unable to restart.

@tvolkert tvolkert merged commit c4cb0ec into flutter:master May 15, 2018
@tvolkert tvolkert deleted the shadows branch May 15, 2018 15:55
HansMuller pushed a commit that referenced this pull request May 15, 2018
HansMuller pushed a commit that referenced this pull request May 15, 2018
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 11, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants