pull_down_button icon indicating copy to clipboard operation
pull_down_button copied to clipboard

Migrating to CupertinoMenu?

Open davidhicks980 opened this issue 8 months ago • 2 comments

Hey @notDmDrl, I saw your message on https://github.com/flutter/flutter/issues/60298 and wanted to start a thread regarding whether to migrate users over to the Cupertino repo at some point. I'm mixed at the moment. I think it could still take a little while before the PR I submitted is reviewed and published, so we should probably wait until we have more input from the Flutter team. My codebase also has a lot of complexity that could manifest into bugs, so I think it'd be good to get more eyes on it before suggesting normal users adopt it. I'm not even sure if the Flutter team will like the way I laid out multiple menu layers (I used a Flow Delegate rather than Overlays -- it made things easier), so there's a chance I'll have to rewrite some of the core menu. Also, your menu is more customizable and has a Material variety, and some users may prefer the level of flexibility. Let me know your thoughts though!

davidhicks980 avatar Nov 07 '23 17:11 davidhicks980

Hey @davidhicks980

My thoughts/plans about the package:

  • Deprecate the package and mention your implementation as a replacement (after it is merged).
  • Deprecate the package and mention your package as a replacement (in case it is not merged and you create your package). In this case point 3 is not possible as I do not want to blatantly "steal" your code only to add some "pretty" stuff.
  • Wait for said merge and completely rewrite the package to use your code as an internal API (with similar public API and customization).
  • Deprecate the package in favor of the new package with menus, context menus, edit menus, and so on (customizable Cupertino widget replacements based on widgets in the Flutter repo). Should all of that stuff go into the current package, I am not sure. I started working on some ideas, but don't have time to continue.
  • Deprecate the package in favor of swift_ui package. The work there barely started, so this may not be an option. Also, I am not sure whether it's planned to have additional customization options in that package. That package might also be a nice place for your code if the Flutter team decides not to merge your PR.

That's about it I guess 😅

I have not seen your codebase yet so I can't guess how much time it will take to potentially merge our solutions. The video you provided in the PR looks really good though, amazing work! 👍

notDmDrl avatar Nov 07 '23 18:11 notDmDrl

As painful as figuring out some of the details were, I am pretty happy with the result of the menu. I think the main thing that would keep the Flutter team from merging would be some of the more opinionated choices I had to make to make the menu look more like iOS.

I think it'd probably be best to first see if it gets merged, and if it doesn't, potentially move some of the more sophisticated bits into this package or the swift_ui package? I'm not sure what the direction of the Flutter team is regarding Cupertino widgets, but it seems like they are still pretty active regarding updates and fixes. Regardless, let's wait and see what happens. Thanks for collaborating on this by the way -- I wasn't sure how to contact you, so I appreciate you reaching out. I'm looking forward to potentially getting our work into the Flutter core library. That'd be super cool.

davidhicks980 avatar Nov 08 '23 05:11 davidhicks980