isSuccessByTag method

bool isSuccessByTag(
  1. String tag
)

Checks whether the request identified by tag succeeded.

Returns true if the tagged request completed successfully, false if it failed or if the tag does not exist.

Example:

if (results.isSuccessByTag('user')) {
  final user = results.getRequestByTag<UserInfo>('user');
  print('User loaded: $user');
}

Parameters:

  • tag: The tag identifying the request

See also:

Implementation

bool isSuccessByTag(String tag) {
  final index = _tagIndexMap[tag];
  return index != null && isSuccess(index);
}