mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Introduce OffsetBase.isFinite (#3472)
This property will eventually replace OffsetBase.isInfinite. See https://github.com/flutter/flutter/issues/4301
This commit is contained in:
parent
cd417b0519
commit
274d323afe
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user