formatValue static method

String formatValue(
  1. String label,
  2. dynamic list
)

Implementation

static String formatValue(String label, list) {
  var result = list.firstWhere((e) => e["label"] == label);
  if (result.isNotEmpty) {
    Utils.log().d('当前选择的: select -> ' + result.toString());
    return result['value'];
  }
  return "选择框数据没有找到";
}