onBackAction method

dynamic onBackAction(
  1. BuildContext context
)

Implementation

onBackAction(BuildContext context) async {
  FocusScope.of(context)
      .requestFocus(FocusNode());
  if (onBack != null) {
    onBack?.call();
  } else {
    Navigator.pop(context);
  }
}