テキストフィールドに初期値を設定するには?

テキストフィールドに初期値を与え、テキストをクリアするために空の値で再描画したいです。FlutterのAPIでそれを行うには、どのような方法が最適でしょうか?

(メーリングリストより。この回答は私が考えたものではありません。)

class _FooState extends State {
  TextEditingController _controller;

  @override
  void initState() {
    super.initState();
    _controller = new TextEditingController(text: 'Initial value');
  }

  @override
  Widget build(BuildContext context) {
    return new Column(
      children: [
        new TextField(
          // The TextField is first built, the controller has some initial text,
          // which the TextField shows. As the user edits, the text property of
          // the controller is updated.
          controller: _controller,
        ),
        new RaisedButton(
          onPressed: () {
            // You can also use the controller to manipuate what is shown in the
            // text field. For example, the clear() method removes all the text
            // from the text field.
            _controller.clear();
          },
          child: new Text('CLEAR'),
        ),
      ],
    );
  }
}
解説 (4)

TextFieldの代わりにTextFormFieldを使用し、initialValue` プロパティを使用します。

TextFormField(initialValue: "I am smart")
解説 (5)

まだ答えが見つかっていない方、そして答えを探してここに来られた方へ。InputDecoration` フィールドの hintText をチェックしてみてください。

new TextField(
  decoration: new InputDecoration(
    hintText:"My Text String."
  ),
...
解説 (3)