contains method

  1. @override
  2. @useResult
bool contains(
  1. T value
)
override

Returns true if this is an Ok with the given value.

Examples

// prints "true"
print(const Ok<int, String>(2).contains(2));

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

Implementation

@override
@useResult
bool contains(T value) => value == this.value;