aves/lib/widgets/common/extensions/geometry.dart
Thibault Deckers b1920dbe1c lab: transform
2023-05-14 12:50:08 +02:00

7 lines
275 B
Dart

import 'dart:ui';
extension ExtraRect on Rect {
bool containsIncludingBottomRight(Offset offset, {double tolerance = 0}) {
return offset.dx >= left - tolerance && offset.dx <= right + tolerance && offset.dy >= top - tolerance && offset.dy <= bottom + tolerance;
}
}