title: How to trigger onSubmitted on a Flutter for web TextField
body: <p>I have a small flutter app for the web and am showing a TextField.</p>
  
  <p>I now need a callback like onSubmitted whenever the user either leaves the TextField (focus loss) or presses the Enter key. Right now I can't make any callback happen at all.</p>
  
  <pre><code>TextField(
    decoration: InputDecoration(
      labelText: 'Name',
    ),
    controller: TextEditingController(text: event.name),
    onEditingComplete: () { print("editing complete"); },
    onSubmitted: (String value) { print("submitted\n"); },
    maxLines: 1,
  ),
  </code></pre>