SingleSelectQueryWidget<T> constructor

SingleSelectQueryWidget<T>(
  1. String field,
  2. List<LabelValue<T>> items, {
  3. required String label,
  4. String? clearText = "清除",
})

Implementation

SingleSelectQueryWidget(this.field, List<LabelValue<T>> items, {required this.label, this.clearText = "清除"}) : super() {
  if (items.isNotEmpty && clearText != null) {
    this.items.add(LabelValue<T>(clearText!, items.first.value));
  }
  this.items.addAll(items);
}