Skip to content

Update scaffold.dart#63

Merged
daadu merged 1 commit intofluttercommunity:masterfrom
farmery:patch-1
Oct 27, 2020
Merged

Update scaffold.dart#63
daadu merged 1 commit intofluttercommunity:masterfrom
farmery:patch-1

Conversation

@farmery
Copy link
Contributor

@farmery farmery commented Oct 2, 2020

in the original file the option to change the frontlayer's color wasn't available from the scaffold's constructor so i made it possible here.

in the original file the option to change the frontlayer's color wasn't available from the scaffold's constructor so i made it possible here.
@daadu
Copy link
Member

daadu commented Oct 3, 2020

@WieFel Do you think this is needed? Can't applying background color to backLayer widget do the same?

@WieFel
Copy link
Collaborator

WieFel commented Oct 3, 2020

@WieFel Do you think this is needed? Can't applying background color to backLayer widget do the same?

LGTM. We already have backLayerBackgroundColor and the suggestion by @farmery would be to add the same for the front layer. frontLayerBackgroundColor and backLayerBackgroundColor could both be avoided if the user would wrap the back-/front-layer in a Column or similar and colors the background of it.

However, I think it's more convenient to have the two color properties present.

Comment on lines +143 to +144

final Color frontLayerBackgroundColor;
Copy link
Collaborator

Choose a reason for hiding this comment

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

@farmery please add documentation similar to backLayerBackgroundColor!


Widget _buildFrontPanel(BuildContext context) {
return Material(
color: this.widget.frontLayerBackgroundColor?? Colors.white,
Copy link
Collaborator

Choose a reason for hiding this comment

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

@farmery please remove the ?? Colors.white.

Docs of Material.color say: "By default, the color is derived from the [type] of material."
So, if widget.frontLayerBackgroundColor is not set (= is null), Material handles the initialisation of the color itself.

@daadu
Copy link
Member

daadu commented Oct 4, 2020

@farmery Please do necessary changes. Awaiting for it.

@daadu
Copy link
Member

daadu commented Oct 27, 2020

@WieFel Apply the changes yourself, and let's merge this, so that it lands in the next release.

@daadu
Copy link
Member

daadu commented Oct 27, 2020

@WieFel You will have to push changes to farmery:patch-1 or use Github UI to make changes.

@WieFel WieFel mentioned this pull request Oct 27, 2020
@daadu daadu merged commit 160c642 into fluttercommunity:master Oct 27, 2020
@daadu
Copy link
Member

daadu commented Oct 28, 2020

This feature has landed with v0.4.7 on pub.dev.

@farmery Check yourself on README!!

@farmery
Copy link
Contributor Author

farmery commented Oct 28, 2020 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants