Skip to content

Commit

Permalink
Introduce OffsetBase.isFinite (flutter#3472)
Browse files Browse the repository at this point in the history
This property will eventually replace OffsetBase.isInfinite.

See flutter/flutter#4301
  • Loading branch information
abarth authored Mar 14, 2017
1 parent cd417b0 commit 274d323
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/ui/geometry.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 274d323

Please sign in to comment.