onError method

dynamic onError(
  1. String errorMessage
)

Displays the errorMessage in a snackbar of the parent widget

Implementation

onError(String errorMessage) {
  ScaffoldMessenger.of(buildContext).showSnackBar(SnackBar(
      content: Text(errorMessage),
      action: SnackBarAction(
          label: 'HIDE',
          onPressed:
              ScaffoldMessenger.of(buildContext).hideCurrentSnackBar)));
}