【问题标题】:build a Form with InputTextField and DropDownMenu使用 InputTextField 和 DropDownMenu 构建表单
【发布时间】:2020-03-29 00:43:43
【问题描述】:

请我想在 Flutter 中构建一个包含 TextFormFields 和 DropDownButton 的 Form 小部件,有人可以帮我展示一下什么是合适的方法吗?谢谢

【问题讨论】:

    标签: flutter flutter-layout flutter-dependencies


    【解决方案1】:

    请查看下面的 TypeAhead with Form 示例。

    https://github.com/AbdulRahmanAlHamali/flutter_typeahead

    TypeAheadField(
      getImmediateSuggestions: false,
      textFieldConfiguration: TextFieldConfiguration(
        autofocus: false,
        controller: _typeAheadFullTextController,  
        decoration: InputDecoration(
            hintText: "Enter keyword.",
          //  suffixIcon: 
            )
         ),
      suggestionsCallback: (pattern) {},
      itemBuilder: (context, suggestion) {
        return ListTile(
          title: Text(suggestion),
        );
      },
      onSuggestionSelected: (suggestion) {
      },
    );
    

    【讨论】:

    • 这是 Flutter 吗?
    • 是的。在颤抖中。
    猜你喜欢
    • 1970-01-01
    • 2019-08-13
    • 1970-01-01
    • 2012-02-20
    • 2016-05-11
    • 2012-07-11
    • 2012-10-19
    • 2011-10-23
    • 1970-01-01
    相关资源
    最近更新 更多