isSome property

  1. @useResult
bool isSome

Whether this is a Some.

Examples

// prints "true"
print(const Some(2).isSome);

// prints "false"
print(const None<int>().isSome);

Implementation

@useResult
bool get isSome;