within method Null safety
Checks if this value is within the range: [from
, to
].
Implementation
bool within(num from, num to) =>
(from <= to && this >= from && this <= to) ||
(from > to && this >= to && this <= from);
Checks if this value is within the range: [from
, to
].
bool within(num from, num to) =>
(from <= to && this >= from && this <= to) ||
(from > to && this >= to && this <= from);