1
0
Fork 0
mirror of https://gitlab.com/nkming2/nc-photos.git synced 2025-03-10 17:28:56 +01:00
nc-photos/app/lib/num_extension.dart

12 lines
272 B
Dart
Raw Normal View History

2021-06-21 11:04:09 +02:00
extension NumExtension on num {
bool inRange(
num beg,
num end, {
bool isBegInclusive = true,
bool isEndInclusive = true,
}) {
return (this > beg || (isBegInclusive && this == beg)) &&
(this < end || (isEndInclusive && this == end));
}
}