-
Notifications
You must be signed in to change notification settings - Fork 36
Added callbacks for backdrop events #30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are some changes to be done:
- rename the callbacks
- proper indentations
- callback only when the event happens (put inside the if condition)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add trailing comma
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
refactor it
@WieFel Please review this? I think this feature is useful. |
Co-authored-by: Harsh Bhikadia <harsh.bhikadiya@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@vlytvyne refactor properly
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.