operator == method
Compare equality between two Option
values.
Option
values are considered equal if the values they hold are equal,
or if they hold references to the same object (identical()).
Note that None values are always equal to one another. Their T
type
is elided implicitly.
Implementation
@override
operator ==(Object other) => switch (other) {
Some(value: T value) when isSome() => identical(value, unwrap()) || value == unwrap(),
None() when isNone() => true,
_ => false
};