📜  颤振中的多个项目选择器 - 任何代码示例

📅  最后修改于: 2022-03-11 14:59:07.208000             🧑  作者: Mango

代码示例1
child: MultiSelect(
  autovalidate: false,
  titleText: title,
  validator: (value) {
    if (value == null) {
      return 'Please select one or more option(s)';
    }
  },
  errorText: 'Please select one or more option(s)',
  dataSource: [
    {
      "display": "Australia",
      "value": 1,
    },
    {
      "display": "Canada",
      "value": 2,
    },
    {
      "display": "India",
      "value": 3,
    },
    {
      "display": "United States",
      "value": 4,
    }
  ],
  textField: 'display',
  valueField: 'value',
  filterable: true,
  required: true,
  value: null,
  onSaved: (value) {
    print('The value is $value');
  }
),