回答編集履歴
1
修正部分の不足を追加
test
CHANGED
@@ -10,6 +10,14 @@
|
|
10
10
|
|
11
11
|
response = await dio.get(url);
|
12
12
|
|
13
|
+
//デコード
|
14
|
+
|
15
|
+
String responseBody = response.data
|
16
|
+
|
17
|
+
List<int> list = responseBody.codeUnits;
|
18
|
+
|
19
|
+
Uint8List bytes = Uint8List.fromList(list);
|
20
|
+
|
13
21
|
```
|
14
22
|
|
15
23
|
|
@@ -18,7 +26,7 @@
|
|
18
26
|
|
19
27
|
```dart
|
20
28
|
|
21
|
-
Response<List<int>>
|
29
|
+
Response<List<int>> bytes = await Dio().get<List<int>>(url,
|
22
30
|
|
23
31
|
options: Options(responseType: ResponseType.bytes), // // set responseType to `bytes`
|
24
32
|
|