showError static method

Future showError(
  1. Exception ex
)

Implementation

static Future showError(Exception ex) async {
  String message = ex.toString();

  String title = 'ERROR ';
  if (ex is NsgApiException) {
    message = ex.error.message ?? '';
    title += ex.error.code?.toString() ?? '';
  }
  message = extractErrorMessage(message);
  await _showError(message, title);
}