Several people have been asking about this and have stated that using Local state in Custom Actions and Custom Widgets does not work.
However, that is not entirely true. I have managed to make it work just fine (with a few quirks, but I'll get to that).
First up I have a simple local state variable named test:
I then have a very simple custom action that looks like this:
Notice how the editor complains about FFAppState? We are just going to ignore it. Check errors will also complain - again - we are just going to ignore it.
I also have a custom widget that uses local state. The code looks like this: