Hash code is based on val, unit.
@override int get hashCode => _hashCode ?? (_hashCode = (unit != null) ? val.hashCode ^ unit.hashCode : val.hashCode);