Skip to content

Adds shadowColor property to the Card widget#47273

Merged
fluttergithubbot merged 4 commits intoflutter:masterfrom
josh-burton:card-shadow-color
Feb 12, 2020
Merged

Adds shadowColor property to the Card widget#47273
fluttergithubbot merged 4 commits intoflutter:masterfrom
josh-burton:card-shadow-color

Conversation

@josh-burton
Copy link
Copy Markdown
Contributor

@josh-burton josh-burton commented Dec 18, 2019

Description

Adds a new shadowColor property to the Card widget, to allow customizing the shadow color.

Related Issues

#47272
#33257

Tests

I added the following tests:

card_test.dart - added a test that ensures the cards default shadow color is black, and that if a shadowColor is set, the Material shadowColor gets that value.

card_theme_test.dart - modified tests to check that the material gets the shadow color from the card theme.

Checklist

Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes ([x]). This will ensure a smooth and quick review process.

  • I read the [Contributor Guide] and followed the process outlined there for submitting PRs.
  • I signed the [CLA].
  • I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement].
  • I read the [Tree Hygiene] wiki page, which explains my responsibilities.
  • I updated/added relevant documentation (doc comments with ///).
  • All existing and new tests are passing.
  • The analyzer (flutter analyze --flutter-repo) does not report any problems on my PR.
  • I am willing to follow-up on review comments in a timely manner.

Breaking Change

Did any tests fail when you ran them? Please read [Handling breaking changes].

  • No, no existing tests failed, so this is not a breaking change.

@fluttergithubbot fluttergithubbot added f: material design flutter/packages/flutter/material repository. framework flutter/packages/flutter repository. See also f: labels. labels Dec 18, 2019
Copy link
Copy Markdown
Contributor

@justinmc justinmc left a comment

Choose a reason for hiding this comment

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

Thanks for the PR! I think this makes sense. Just one small comment about code order in the test.

@HansMuller Is this alright given the proposed changes to theming?

Comment thread packages/flutter/test/material/card_test.dart Outdated
Comment thread packages/flutter/lib/src/material/card.dart Outdated
Comment thread packages/flutter/test/material/card_test.dart Outdated
Comment thread packages/flutter/lib/src/material/card.dart Outdated
@josh-burton
Copy link
Copy Markdown
Contributor Author

@HansMuller @justinmc is there any other changes needed on this?

Copy link
Copy Markdown
Contributor

@justinmc justinmc left a comment

Choose a reason for hiding this comment

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

LGTM

Thanks for the contribution and sorry I didn't notice you had updated it! There was one test failure, but it looked like an unrelated timeout to me. I'll rerun that and try to get this merged.

@fluttergithubbot
Copy link
Copy Markdown
Contributor

This pull request is not suitable for automatic merging in its current state.

  • The status or check suite web_tests-2-linux has failed. Please fix the issues identified (or deflake) before re-applying this label.

@josh-burton
Copy link
Copy Markdown
Contributor Author

Thanks @justinmc!

@josh-burton josh-burton deleted the card-shadow-color branch February 12, 2020 22:09
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Aug 1, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

f: material design flutter/packages/flutter/material repository. framework flutter/packages/flutter repository. See also f: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants