is_odd 1.0.1 is_odd: ^1.0.1 copied to clipboard
Minimalist and elegant API that returns true if the given number is odd.
import 'dart:math';
import 'package:is_odd/is_odd.dart';
void main() {
final number = Random().nextInt(0xFF);
print('$number is ${isOdd(number) ? '' : 'not'} odd');
}