Skip to content

[ExpansionPanelList] adds dividerColor property - #59641

Merged
fluttergithubbot merged 3 commits into
flutter:masterfrom
AyushBherwani1998:expansion_panel_list
Jun 17, 2020
Merged

fluttergithubbot merged 3 commits into
flutter:masterfrom
AyushBherwani1998:expansion_panel_list

Conversation

@AyushBherwani1998

Copy link
Copy Markdown
Member

Description

Exposes the dividerColor property of MergeableMaterial to change the color of dividers when ExpansionPanel.isExpanded is false.

Related Issues

#51321

Tests

I added the following tests:

  • Added test to check that dividerColor is respected by ExpansionPanelList and ExpansionPanelList.radio.

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.
  • Yes, this is a breaking change. If not, delete the remainder of this section.

@fluttergithubbot fluttergithubbot added p: material_ui material_ui package in flutter/packages framework flutter/packages/flutter repository. See also f: labels. labels Jun 17, 2020

@shihaohong shihaohong left a comment

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.

LGTM, with some nits

expect(box.size.width, equals(736.0));
});

testWidgets('ExpansionPanelList respect dividerColor', (WidgetTester tester) async {

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.

nit:

Suggested change
testWidgets('ExpansionPanelList respect dividerColor', (WidgetTester tester) async {
testWidgets('ExpansionPanelList respects dividerColor', (WidgetTester tester) async {

expect(decoration.border.top.color, dividerColor);
});

testWidgets('ExpansionPanelList.Radio respects DividerColor', (WidgetTester tester) async {

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.

nit:

Suggested change
testWidgets('ExpansionPanelList.Radio respects DividerColor', (WidgetTester tester) async {
testWidgets('ExpansionPanelList.radio respects DividerColor', (WidgetTester tester) async {

),
],
),
)

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.

nit: trailing comma

Suggested change
)
),

final DecoratedBox decoratedBox = tester.widget(find.byType(DecoratedBox).last);
final BoxDecoration decoration = decoratedBox.decoration as BoxDecoration;

// For the last DecoratedBox, we will have a Border.top.

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.

nit: slightly more description

Suggested change
// For the last DecoratedBox, we will have a Border.top.
// For the last DecoratedBox, we will have a Border.top with the provided dividerColor.

final DecoratedBox decoratedBox = tester.widget(find.byType(DecoratedBox).last);
final BoxDecoration boxDecoration = decoratedBox.decoration as BoxDecoration;

// For the last DecoratedBox, we will have a Border.top.

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.

nit: slightly more description

Suggested change
// For the last DecoratedBox, we will have a Border.top.
// For the last DecoratedBox, we will have a Border.top with the provided dividerColor.

@shihaohong shihaohong self-assigned this Jun 17, 2020
@fluttergithubbot
fluttergithubbot merged commit 37cb7b7 into flutter:master Jun 17, 2020
zljj0818 pushed a commit to zljj0818/flutter that referenced this pull request Jun 22, 2020
vasilich6107 added a commit to artflutter/whatsup_flutter_june2020 that referenced this pull request Jul 8, 2020
mingwandroid pushed a commit to mingwandroid/flutter that referenced this pull request Sep 6, 2020
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Jul 30, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

framework flutter/packages/flutter repository. See also f: labels. p: material_ui material_ui package in flutter/packages

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants