makeCallback method

Future<void> makeCallback()

Implementation

Future<void> makeCallback() async {
  if (widget.isAsync == true) {
    setState(() {
      isProcessing = true;
    });

    await widget.callback();

    if (mounted) {
      setState(() {
        isProcessing = false;
      });
    }
  } else {
    widget.callback();
  }
}