Int32 class Null safety
An immutable 32bit signed integer, in the range 2^31, 2^31  1
.
Arithmetic operations may overflow in order to maintain this range.
 Implemented types
Constructors
Properties
 bitLength → int

Returns the minimum number of bits required to store this integer.
readonlyoverride
 hashCode → int

The hash code for this object.
readonlyoverride
 isEven → bool

Returns
true
if and only if this integer is even.readonlyoverride  isMaxValue → bool

Returns
true
if and only if this integer is the maximum signed value that can be represented within its bit size.readonlyoverride  isMinValue → bool

Returns
true
if and only if this integer is the minimum signed value that can be represented within its bit size.readonlyoverride  isNegative → bool

Returns
true
if and only if this integer is less than zero.readonlyoverride  isOdd → bool

Returns
true
if and only if this integer is odd.readonlyoverride  isZero → bool

Returns
true
if and only if this integer is zero.readonlyoverride  runtimeType → Type

A representation of the runtime type of the object.
readonlyinherited
Methods

abs(
) → Int32 
Returns the absolute value of this integer.
override

clamp(
dynamic lowerLimit, dynamic upperLimit) → Int32 
Clamps this integer to be in the range
lowerLimit
upperLimit
.override 
compareTo(
dynamic other) → int 
Compares this object to another object.
override

noSuchMethod(
Invocation invocation) → dynamic 
Invoked when a nonexistent method or property is accessed.
inherited

numberOfLeadingZeros(
) → int 
Returns the number of highorder zeros in this integer's bit
representation.
override

numberOfTrailingZeros(
) → int 
Returns the number of loworder zeros in this integer's bit representation.
override

remainder(
dynamic other) → Int32 
Returns the remainder of the truncating division of this integer by
other
.override 
shiftRightUnsigned(
int n) → Int32 
Unsigned rightshift operator.
override

toBytes(
) → List< int?> 
Returns a bytesequence representation of this integer.
override

toDouble(
) → double 
Returns the double representation of this integer.
override

toHexString(
) → String 
Returns a string representing the value of this integer in hexadecimal
notation; example:
'0xd'
.override 
toInt(
) → int 
Returns the int representation of this integer.
override

toInt32(
) → Int32 
Returns an Int32 representation of this integer.
override

toInt64(
) → Int64 
Returns an Int64 representation of this integer.
override

toRadixString(
int radix) → String 
Returns a string representing the value of this integer in the given radix.
override

toSigned(
int width) → Int32 
Returns the least significant
width
bits of this integer, extending the highest retained bit to the sign. This is the same as truncating the value to fit inwidth
bits using an signed 2s complement representation. The returned value has the same bit value in all positions higher thanwidth
.override 
toString(
) → String 
A string representation of this object.
override

toUnsigned(
int width) → Int32 
Returns the least significant
width
bits of this integer as a nonnegative number (i.e. unsigned representation). The returned value has zeros in all bit positions higher thanwidth
.override
Operators

operator %(
dynamic other) → Int32 
Euclidean modulo operator.
override

operator &(
dynamic other) → Int32 
Bitwise and operator.
override

operator *(
dynamic other) → Int32 
Multiplication operator.
override

operator +(
dynamic other) → Int32 
Addition operator.
override

operator (
dynamic other) → Int32 
Subtraction operator.
override

operator <(
dynamic other) → bool 
Relational less than operator.
override

operator <<(
int n) → Int32 
Left bitshift operator.
override

operator <=(
dynamic other) → bool 
Relational less than or equal to operator.
override

operator ==(
Object other) → bool 
Returns
true
if this Int32 has the same numeric value as the given object. The argument may be an int or an IntX.override 
operator >(
dynamic other) → bool 
Relational greater than operator.
override

operator >=(
dynamic other) → bool 
Relational greater than or equal to operator.
override

operator >>(
int n) → Int32 
Right bitshift operator.
override

operator ^(
dynamic other) → Int32 
Bitwise xor operator.
override

operator unary(
) → Int32 
Negate operator.
override

operator (
dynamic other) → Int32 
Bitwise or operator.
override

operator ~(
) → Int32 
Bitwise negate operator.
override

operator ~/(
dynamic other) → Int32 
Truncating division operator.
override
Static Methods
Constants
 MAX_VALUE → const Int32

The maximum positive value attainable by an Int32, namely
2147483647.
Int32._internal(0x7FFFFFFF)
 MIN_VALUE → const Int32

The minimum positive value attainable by an Int32, namely
2147483648.
Int32._internal(0x80000000)
 ONE → const Int32

An Int32 constant equal to 1.
Int32._internal(1)
 TWO → const Int32

An Int32 constant equal to 2.
Int32._internal(2)
 ZERO → const Int32

An Int32 constant equal to 0.
Int32._internal(0)