isPerfectSquare method
Checks if this integer is a perfect square.
Implementation
bool isPerfectSquare() {
if (this < 0) return false;
final root = math.sqrt(this).toInt();
return root * root == this;
}
Checks if this integer is a perfect square.
bool isPerfectSquare() {
if (this < 0) return false;
final root = math.sqrt(this).toInt();
return root * root == this;
}