onError method

void onError(
  1. Object? key,
  2. dynamic error
)

Function that is called when a future throws an error

Implementation

void onError(Object? key, error) {}