displayError method

  1. @override
dynamic displayError(
  1. DioException dioException,
  2. BuildContext context
)
override

Display a error to the user This method is only called if you provide the API service with a BuildContext.

Implementation

@override
displayError(DioException dioException, BuildContext context) {
  NyLogger.error(dioException.message ?? "");
  showToastNotification(context,
      title: "Oops!",
      description: "Something went wrong",
      style: ToastNotificationStyleType.DANGER);
}