compareTo method

  1. @override
int compareTo(
  1. CheckboxState other
)
override

Compares checkbox states based on their declaration order.

Returns negative if this state comes before other, zero if equal, positive if this state comes after other in the enum declaration.

Implementation

@override
int compareTo(CheckboxState other) {
  return index.compareTo(other.index);
}