isEmpty property
bool
get
isEmpty
Checks if the current object represents an empty or uninitialized state.
This getter returns true if all of the following conditions are met:
- The character string is empty
- The matrixIndex is -1 (likely indicating an unset or invalid index)
- The score is exactly 0
This can be useful for determining if the object has been populated with meaningful data or if it's in its default/empty state.
Returns: bool: true if the object is considered empty, false otherwise.
Implementation
bool get isEmpty => character.isEmpty && matrixIndex == -1 && score == 0;