JSON Parsing1 [Cookbook] Background에서 JSON parsing 하는 방법 [목적] 대부분의 Dart app들이 Single Thread로 동작함. 허나, app Performance를 위해 JSON Document parsing 을 background에서 동작하는 경우가 있음 [방법] 1. http Package 추가 2. http package를 통해 네트워크 request 전송 3. response를 객체 list로 변경 4. 해당 작업을 분리된 background에서 실행 (seperate isolate) [상세 방법] 4. 분리된 background에서 실행하는 방버 Future fetchPhotos(http.Client client) async { final response = await client .get(Uri.parse()); // parsePhoto()는 함.. 2022. 7. 25. 이전 1 다음