dx property

double get dx

The distance fraction in the horizontal direction.

A value of 0.0 corresponds to the leftmost edge. A value of 1.0 corresponds to the rightmost edge. Values are not limited to that range; negative values represent positions to the left of the left edge, and values greater than 1.0 represent positions to the right of the right edge.

Implementation

double get dx => (x + 1.0) / 2.0;