1
0
Fork 0
mirror of https://gitlab.com/nkming2/nc-photos.git synced 2025-03-10 09:18:52 +01:00
nc-photos/app/lib/num_extension.dart
2022-04-06 02:37:58 +08:00

11 lines
272 B
Dart

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));
}
}