setState method

void setState({
  1. int? selectedCount,
  2. bool? selectAllState,
  3. bool? mainButtonState,
  4. bool? subButtonState,
  5. BrnMultipleButtonArrowState? arrowStatus,
})

设置按钮的状态,当主按钮或者此按钮置灰的时候,对应的点击任然会回调,控件只做按钮置灰 selectedCount 已选括号中的数目 selectAllState 全选按钮的选中状态 mainButtonState 主按钮是否置灰 subButtonState 次按钮是否置灰 arrowStatus 控制箭头的状态

Implementation

void setState(
    {int? selectedCount,
    bool? selectAllState,
    bool? mainButtonState,
    bool? subButtonState,
    BrnMultipleButtonArrowState? arrowStatus}) {
  MultiSelectState data = MultiSelectState(
      selectedCount: selectedCount ?? valueNotifier.value.selectedCount,
      selectAllState: selectAllState ?? valueNotifier.value.selectAllState,
      mainButtonState: mainButtonState ?? valueNotifier.value.mainButtonState,
      subButtonState: subButtonState ?? valueNotifier.value.subButtonState,
      arrowStatus: arrowStatus ?? valueNotifier.value.arrowStatus);
  valueNotifier.value = data;
}