flutter 我正在使用DropDownMultiSelect,在这里下拉值的RenderFlex溢出

qv7cva1a  于 2022-12-27  发布在  Flutter
关注(0)|答案(1)|浏览(175)

我在用

DropDownMultiSelect

在那里,我得到了下拉值的RenderFlex溢出错误

child: DropDownMultiSelect(
  onChanged: (c){
    setState(() {
      selectedColors = ["","","","",""];
      initialColor = c;
      for(int i=0; i<initialColor.length; i++){
        selectedColors[i] = initialColor[i];
      }
    });
  },
  options: colorList,
  selectedValues: initialColor,
    whenEmpty: "Select Color",
),

这是我尝试过的

chy5wohz

chy5wohz1#

如果您使用multiselect软件包:
pubspec.yaml文件中的multiselect: ^0.0.7更改为:

multiselect:
    git:
      url: https://github.com/XuannThucc/multiselect
      ref: 8b1dc71ae4982db4c37d477bb8021ac71badd595

然后运行flutter pub get并重建;

相关问题