Added callbacks for backdrop events#30
Conversation
daadu
left a comment
There was a problem hiding this comment.
There are some changes to be done:
- rename the callbacks
- proper indentations
- callback only when the event happens (put inside the if condition)
|
@WieFel Please review this? I think this feature is useful. |
Co-authored-by: Harsh Bhikadia <[email protected]>
|
I doubt if |
|
@vlytvyne We already expose Yes it is not the most appropriate. But if we are planning to change the names then it should be everywhere - keeping backward compatibility in mind I would say following names would be most appropriate.
@WieFel What do you think about it? |
|
Please note that "backdrop" it's a composition of both front and back layers so From https://material.io/components/backdrop#usage : "A backdrop is composed of two surfaces: a back layer and a front layer. The back layer displays actions and context, and these control and inform the front layer's content." |
|
MDG uses following terms for this - "Revealing the back layer" and "Concealing the back layer". Keeping that in mind, the name should be as following:
|
|
I definitely like it better this way. |
|
@WieFel Let us know your views. |
- `showFrontLayer` -> `concealBackLayer` - `showBackLayer` -> `revealBackLayer` - `onFrontLayerVisible` -> `onBackLayerConcealed` - `onBackLayerVisible` -> `onBackLayerRevealed` fluttercommunity#30
WieFel
left a comment
There was a problem hiding this comment.
I think this is a good improvement! :)
There is only one slight change I'd make:
I would change the occurrences of
@Deprecated("..."
"This feature was deprecated after v1.0.0.")to "deprecated after v0.3.3", because this should indicate from which version on the feature was deprecated, or did I get that wrong?
|
@WieFel Yeah, you are right. |
|
@WieFel Done requested changes. |
I find it very useful to know when the front layer expands or collapses. It might come in handy if you want to change or do smt reactively. In my case, I needed to change toolbar title when state of frontLayer changes, so I added this feature.