Skip to content

export drawer's open/close callback#20856

Closed
msyaojz wants to merge 1 commit intoflutter:masterfrom
msyaojz:master
Closed

export drawer's open/close callback#20856
msyaojz wants to merge 1 commit intoflutter:masterfrom
msyaojz:master

Conversation

@msyaojz
Copy link

@msyaojz msyaojz commented Aug 21, 2018

No description provided.

@googlebot
Copy link

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here (e.g. I signed it!) and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

final bool primary;
/// Optional callback that is called when a [Drawer] is opened or closed.
final DrawerCallback drawerCallback;
final DrawerCallback endDrawerCallback;
Copy link
Contributor

Choose a reason for hiding this comment

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

This line also needs documentation, and there should be an empty line between every field declaration

@Jon-Salmon
Copy link

Any development on this @msyaojz
The lack of this feature is currently blocking me from release, so I may need to open a seperate PR for the same isssue soon.

@Hixie
Copy link
Contributor

Hixie commented Sep 18, 2018

This is probably not the approach we would want to take for this... I would imagine we would either make openDrawer return a Future that's also exposed on ScaffoldState, or maybe have a ValueListenable<bool> that reports the current state of each drawer, or some such. But it mostly depends on what the use cases are. I recommend going into more detail in one of the issues linked above about what exactly it is that you need this feature for so that we can come up with a more coherent design.

@Hixie
Copy link
Contributor

Hixie commented Sep 18, 2018

Another possible idea is exposing the Animation that represents the drawers sliding in and out.

(The problem with callbacks is that they wouldn't be usable in other contexts, e.g. you couldn't await one, or pass one to an AnimationBuilder, or the like.)

@jslavitz
Copy link
Contributor

jslavitz commented Oct 1, 2018

Because this implementation isn't really the best way of implementing this feature, we're going to close this pull request for now.

@jslavitz jslavitz closed this Oct 1, 2018
@jslavitz jslavitz reopened this Oct 23, 2018
@Hixie
Copy link
Contributor

Hixie commented Oct 24, 2018

Since the CLA wasn't signed on this PR, I'm going to close it. We can't accept patches where the CLA hasn't been signed.

@msyaojz if you have the opportunity to sign the CLA, please don't hesitate to do so and open a new PR! Thanks!

@bikcrum
Copy link
Contributor

bikcrum commented Mar 7, 2021

This should be resolved by #67249

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.

8 participants