hanldeError method

void hanldeError(
  1. Exception e, {
  2. bool showToast = false,
})

Implementation

void hanldeError(Exception e, {bool showToast = false}) async {
  try {
    String message = e.toString();
    if (showToast) {
      Utils.showToast(message);
    } else {
      textError = message;
      view.updateState();
    }
  } catch (e, stack) {
    debugPrint('$e - $stack');
  }
}