티스토리 뷰
The Dart int type is a 64-bit two's complement number—except when compiled for the web, there it's a 64-bit floating point number with no fractional part (a JavaScript number which has an integer value).
How those values are represented internally depends on optimizations, they can be represented as something smaller if the runtime system knows for sure that the value will fit. That's an optimization, you won't be able to tell the difference.
A "byte" value is an integer in the range 0..255. You can obviously store a byte value in an int.
The most efficient way to store multiple bytes is a Uint8List, which implements List<int>. It stores each element as a single octet. When you read a value out of a Unit8List, its byte value is represented by an int. When you store an int in the Uint8List, only the low 8 bites are stored. So it does expanding reads and truncating writes to move values between an octet and a 64-bit value.
'Dart & Flutter > 궁금했던 것, 몰랐던 것' 카테고리의 다른 글
iOS 14 이상에서는 개발과정에서 설치한 앱 실행 안됨 (0) | 2023.02.08 |
---|---|
syncfusion chart 로딩이 오래 걸린다. (0) | 2023.01.19 |
audioplayers (0) | 2022.07.25 |
앱에서 생성한 파일 저장하기 (2) | 2022.07.15 |
Text 위젯의 fontSize 에 적당한 Container 위젯의 Height (0) | 2022.07.06 |
- Total
- Today
- Yesterday
- Bluetooth
- 다트
- BLE
- 인사이트
- Chrome
- error
- Flutter
- 한빛미디어
- 이미지
- addPostFrameCallback
- 문제 해결
- firebase
- SizedBox
- 앱개발
- TextFormField
- 에러
- 앱
- DART
- 디자인
- position
- 앱 프로그래밍
- TextField
- IOS
- plugin
- UX
- UI
- Syncfusion
- 크롬
- hide
- 플러터
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | |||||
3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | 25 | 26 | 27 | 28 | 29 | 30 |