handleError method

void handleError(
  1. BuildContext context,
  2. Object error,
  3. StackTrace stackTrace
)

Implementation

void handleError(BuildContext context, Object error, StackTrace stackTrace) {
  showSnackBar(context, "An error occurred: ${error.toString()}");
  // Log errors or send them to an analytics service here if needed
}