containsErr method

  1. @override
  2. @useResult
bool containsErr(
  1. E error
)
override

Returns true if this is an Err with the given error.

Examples

// prints "false"
print(const Ok<int, String>(2).containsErr('error'));

// prints "true"
print(const Err<int, String>('error').containsErr('error'));

Implementation

@override
@useResult
bool containsErr(E error) => false;