isSingleOrEmpty property

bool isSingleOrEmpty

check has one or zero element.

Implementation

bool get isSingleOrEmpty => length == 0 || length == 1;