compatibleWithUnit method Null safety

bool compatibleWithUnit(
  1. String unit
)

Returns whether this can be coerced to the given unit.

This always returns true for a unitless number.

Implementation

bool compatibleWithUnit(String unit);