noneIfEmpty property

Option<Set<T>> get noneIfEmpty

Returns this set wrapped in a Some if it's not empty, otherwise returns None.

Implementation

Option<Set<T>> get noneIfEmpty => isEmpty ? const None() : Some(this);