We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 01d91c1 commit 1f32d44Copy full SHA for 1f32d44
pkgs/fixnum/lib/src/int64_native.dart
@@ -37,6 +37,7 @@ class Int64 implements IntX {
37
factory Int64.fromInts(int high, int low) =>
38
Int64((high << 32) | (low & 0xFFFFFFFF));
39
40
+ /// Constructs an [Int64] from the first 8 bytes in [bytes], as little endian.
41
factory Int64.fromBytes(List<int> bytes) => Int64(((bytes[7] & 0xFF) << 56) |
42
((bytes[6] & 0xFF) << 48) |
43
((bytes[5] & 0xFF) << 40) |
@@ -46,6 +47,7 @@ class Int64 implements IntX {
46
47
((bytes[1] & 0xFF) << 8) |
48
(bytes[0] & 0xFF));
49
50
+ /// Constructs an [Int64] from the first 8 bytes in [bytes], as big endian.
51
factory Int64.fromBytesBigEndian(List<int> bytes) =>
52
Int64(((bytes[0] & 0xFF) << 56) |
53
((bytes[1] & 0xFF) << 48) |
0 commit comments