Convert byte list to int.
int convertByteListToInt(List<int> bytes) { return Uint8List.fromList(bytes).buffer.asByteData().getInt64(0); }