getCheckBoxStateById method

bool getCheckBoxStateById(
  1. String id,
  2. bool checked
)

根据id获取CheckBox的勾选状态

Implementation

bool getCheckBoxStateById(String id, bool checked) {
  if (checkBoxStates[id] == null) {
    // checkBox本身的状态
    checkBoxStates[id] = checked;
  }
  return checkBoxStates[id]!;
}