isDirectionChange method Null safety

bool isDirectionChange(
  1. TextDirection otherDirection
)

Returns true if otherDirection is known to be different from this direction.

Implementation

bool isDirectionChange(TextDirection otherDirection) =>
    otherDirection != TextDirection.UNKNOWN && this != otherDirection;