First note that code-only answers by themselves are already questionable and low-quality - they are almost never a good answer but indeed perhaps not bad enough to call for deletion. So the discussion here is about whether we should delete a (almost definitely) low quality answer, or if we should deal with it in some other way.
Noting that it is not the end of the world if we happen to delete a low quality answer - our main concern should be about not deleting high quality answers. When moderating low-quality posts, don't overthink it. Preserving crap just for the sake of it isn't sensible.
The text before the code seems like a relevant explanation of what should be done to solve the problem, followed by the code. This text needed to be in English. It isn't really a code only answer.
The difference between an "almost code-only" answer in English and one another language, is that the one in another language cannot reasonably be understood by all readers. Whereas a pure code-only answer that only assumes that you know flutter (in this case) is acceptable, although probably of bad quality.
We cannot close answers waiting for the OP to fix them. Nor should we attempt to translate them unless maybe we are truly fluent in the language - which isn't expected. Also even when fluent, a translation always risks changing nuances or details, so it's always a radical edit probably best to avoid.
It is up to the person who posts the answer to know the site rules. If they do not want their content deleted, they have to post in English. The abnormal high frequency of posts in Portuguese, Spanish and Russian that SO experiences over time suggests that a lot of these posts are just users thinking they are using the respective non-English site and post on the English site by mistake.
In summary, the most sensible course of action is to delete these kind of posts.