3

I need to implement a feature on flutter web, where if someone copies an image by pressing crtl+c and pastes it in a TextField using ctrl+v the image should pop-up and from there submit it to the database.

My question is how can I go about doing this? Is there a way to make it work with ctrl+v rather than a button.

Rohan Thacker
  • 5,377
  • 3
  • 21
  • 34

1 Answers1

3

is there a way to make it work with ctrl v rather than a button.

Yes there is, In flutter Shortcuts are handled with a Shortcuts Widget, along with this widget you'll also need to define an set of Actions and an Intent ( Not the same as Android Intent).

The Intent is where you will handle the actual logic of your action, do check the docs linked below as the exact way these classes mix together is not straight-forward.

This action is going complicated so lets work it though step-by-step if you need more help.

Flutter docs for Shortcuts

Rohan Thacker
  • 5,377
  • 3
  • 21
  • 34