handleError method
- BuildContext context,
- Object error,
- 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
}