Introduce OffsetBase.isFinite (#3472)

This property will eventually replace OffsetBase.isInfinite.

See https://github.com/flutter/flutter/issues/4301
This commit is contained in:
Adam Barth 2017-03-14 10:26:31 -07:00 committed by GitHub
parent cd417b0519
commit 274d323afe

View File

@ -24,6 +24,9 @@ abstract class OffsetBase {
/// _both_ dimensions set to [double.INFINITY].
bool get isInfinite => _dx >= double.INFINITY || _dy >= double.INFINITY;
/// Whether both dimensions are finite.
bool get isFinite => _dx.isFinite && _dy.isFinite;
/// Less-than operator. Compares an [Offset] or [Size] to another [Offset] or
/// [Size], and returns true if both the horizontal and vertical values of the
/// left-hand-side operand are smaller than the horizontal and vertical values