refreshItem method

void refreshItem(
  1. bool v
)

提供方法给外部,可以调用这个方法进行刷新item

Implementation

void refreshItem(bool v) {
  /**
      Exception caught by gesture
      The following assertion was thrown while handling a gesture:
      setState() called after dispose()
   */
  v ??= false;
  if (mounted) {
    setState(() {
      dateModel.isSelected = v;
    });

    if (widget.clickCall != null) {
      widget.clickCall();
    }
  }
}