From 274d323afe6c19f8bbe1668fc9d80ea2e0d36587 Mon Sep 17 00:00:00 2001 From: Adam Barth Date: Tue, 14 Mar 2017 10:26:31 -0700 Subject: [PATCH] Introduce OffsetBase.isFinite (#3472) This property will eventually replace OffsetBase.isInfinite. See https://github.com/flutter/flutter/issues/4301 --- lib/ui/geometry.dart | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/ui/geometry.dart b/lib/ui/geometry.dart index 222b5137ec2..8471968fc9c 100644 --- a/lib/ui/geometry.dart +++ b/lib/ui/geometry.dart @@ -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