Custom context menu example
This a sample meant to demonstrate custom context menus and the various ways they can be used. This means the unified ability to customize the text selection toolbar in text fields and on selectable text and the right-click/long-press menu anywhere else in the app.
![]() |
![]() |
|---|
Must wait for https://github.com/flutter/flutter/pull/107193.
Hey @justinmc, I'm curious what versions of Flutter this sample should compile and run with. I'm happy with master only or master + beta in experimental, but I'd like an idea of when it is intended to migrate to top level with stable availability of the used APIs.
Secondly, this sample should be added to the CI pipelines. I'm happy to either point you in the right direction, or submit a PR to your repo for the required changes...
I've made this PR a draft for now because it requires https://github.com/flutter/flutter/pull/107193 to work, which hasn't been merged yet. Once it's merged I'll make sure this works on master and open it for review. Should I document this anywhere in the PR?
About CI, I'm happy to do the work to add it if you point me in the right direction. Thank you for commenting and helping me with this!
Please add it to https://github.com/flutter/samples/blob/main/tool/flutter_ci_script_master.sh
@domesticmouse This PR is now ready for review. The PR that it depended on in flutter/flutter has been merged, so it works on Flutter's master channel.
Are the CI failures anything that I should worry about?
From the CI runs, it looks like you stripped the +x permission from the master CI script. We need the CI passing before I can land this PR.
Maybe my editor automatically stripped that +x permission somehow? To fix it I just tried running this:
$ git update-index --chmod=+x tool/flutter_ci_script_master.sh
And committed and pushed it. Hopefully that fixes it.
Looks like there are still failures. What were you seeing that made you think it was a file permissions problem, is that still showing up in the test output? I can't tell what's wrong but I'm not familiar with this repo.
Also, looking at https://github.com/flutter/samples/actions/runs/3412894076/jobs/5678974213#step:5:1 it looks like there are files in need of dart format
Current failure: I never even thought to add tests to this, so the default "flutter create" test is still there and failing. I'll add some real tests and deleted that one.
@domesticmouse I think this is ready to go! I realized I had never updated the default test, whoops. I added a bunch of real ones now.

