📜  堆叠钩子 - 任何代码示例

📅  最后修改于: 2022-03-11 15:00:15.489000             🧑  作者: Mango

代码示例1
class _StringForm extends HookViewModelWidget {
  _StringForm({Key key}) : super(key: key, reactive: false);

  @override
  Widget buildViewModelWidget(
    BuildContext context,
    PartialBuildsViewModel model,
  ) {
    var text = useTextEditingController();
    return TextField(
      controller: text,
      onChanged: model.updateString,
    );
  }
}