Uint64 class
Represents a 64-bit unsigned integer.
This class uses Dart's native number type BigInt and has a value check for big integers. BigInt will be translated correctly into JavaScript (supported by dart2js). Value range is 0 through 18446744073709551615.
- Implemented types
Constructors
- Uint64.new([num value = 0, num value2 = 0])
-
factory
Properties
- hashCode → int
-
The hash code for this object.
no setteroverride
- isEven → bool
-
Whether this big integer is even.
no setter
- isMaxValue → bool
-
no setter
- isMinValue → bool
-
no setter
- isOdd → bool
-
Whether this big integer is odd.
no setter
- isZero → bool
-
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
abs(
) → Uint64 -
compareTo(
Uint64 other) → int -
Compares this object to another object.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toBigInt(
) → BigInt - Returns this Uint64 as a BigInt.
-
toBytes(
) → Uint8List - Converts to 64-bit byte array.
-
toDouble(
) → double - Returns this Uint64 as a double.
-
toHexString(
) → String - Converts to hex string representation. Fills with leading 0 to reach 16 characters length.
-
toInt(
) → int - Returns this Uint64 as a int.
-
toIntArray(
) → List< int> -
Converts to a pair of 32-bit integers (
lower, higher
). -
toJson(
) → dynamic -
toString(
) → String -
A string representation of this object.
override
Operators
-
operator %(
dynamic other) → Uint64 - Euclidean modulo operator.
-
operator &(
dynamic other) → Uint64 - Bit-wise and operator.
-
operator *(
dynamic other) → Uint64 - Multiplication operator.
-
operator +(
dynamic other) → Uint64 - Addition operator.
-
operator -(
dynamic other) → Uint64 - Subtraction operator.
-
operator /(
dynamic other) → double - Division operator.
-
operator <(
dynamic other) → bool - Relational less than operator.
-
operator <=(
dynamic other) → bool - Relational less than or equal operator.
-
operator ==(
Object other) → bool -
The equality operator.
override
-
operator >(
dynamic other) → bool - Relational greater than operator.
-
operator >=(
dynamic other) → bool - Relational greater than or equal operator.
-
operator ^(
Object other) → Uint64 - Bit-wise exclusive-or operator.
-
operator unary-(
) → Uint64 - Return the negative value of this integer.
-
operator |(
dynamic other) → Uint64 - Bit-wise or operator.
-
operator ~/(
dynamic other) → Uint64 - Truncating division operator.
Static Properties
Static Methods
-
fromBigInt(
BigInt bigInt) → Uint64 -
Creates a Uint64 from a
bigInt
. -
fromBytes(
Uint8List bytes) → Uint64 -
Creates a Uint64 from a uint8list
bytes
(64-bit). -
fromDto(
UInt64DTO dto) → Uint64 -
Creates a Uint64 from a pair of
UInt64DTO
. -
fromHex(
String hex) → Uint64 -
Creates a Uint64 from a
hex
. -
fromInt(
int value) → Uint64 - Creates a Uint64 from a int.
-
fromInts(
int lower, int higher) → Uint64 - Creates a Uint64 from a pair of 32-bit integers.
-
fromString(
String input) → Uint64 - Generate UInt64 from a string. Deterministic uint64 value for the given string.