In Flutter, you can’t detect when a user presses the “delete” key on a mobile keyboard in an empty text field. Many developers are confused by this limitation, as exemplified by an open issue on GitHub:

Greg explained this limitation in that thread:

Today we build a hero widget in Flutter that’s inspired by the Protect hero in the Nest app.

If you enjoy the workshop, be sure to subscribe to the SuperDeclarative! YouTube channel, and also follow me @SuprDeclarative on Twitter for future productions.

To continue the fun of this Widget Workshop, you can learn how to implement animated glows and a dark version of the Protect hero UI in the Extended Widget Workshop, available at the SuperDeclarative! Academy:

Thanks for watching, and I’ll see you in the next Widget Workshop.

Matt Carroll

I am SuperDeclarative! (Ex-Flutter at Google)

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store