Skip to content

Commit 1f32d44

Browse files
committed
Add docs to fromBytesBigEndian and fromBytes
1 parent 01d91c1 commit 1f32d44

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

pkgs/fixnum/lib/src/int64_native.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ class Int64 implements IntX {
3737
factory Int64.fromInts(int high, int low) =>
3838
Int64((high << 32) | (low & 0xFFFFFFFF));
3939

40+
/// Constructs an [Int64] from the first 8 bytes in [bytes], as little endian.
4041
factory Int64.fromBytes(List<int> bytes) => Int64(((bytes[7] & 0xFF) << 56) |
4142
((bytes[6] & 0xFF) << 48) |
4243
((bytes[5] & 0xFF) << 40) |
@@ -46,6 +47,7 @@ class Int64 implements IntX {
4647
((bytes[1] & 0xFF) << 8) |
4748
(bytes[0] & 0xFF));
4849

50+
/// Constructs an [Int64] from the first 8 bytes in [bytes], as big endian.
4951
factory Int64.fromBytesBigEndian(List<int> bytes) =>
5052
Int64(((bytes[0] & 0xFF) << 56) |
5153
((bytes[1] & 0xFF) << 48) |

0 commit comments

Comments
 (0)