From 9baa6b39c4d02a672b1dfbe113a297eaac807b33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ad=C3=A3o=20J=C3=BAnior?= Date: Thu, 28 Jul 2016 14:10:33 -0300 Subject: [PATCH 1/2] use latest version of http_in_memory_web_api --- public/docs/_examples/server-communication/dart/pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/docs/_examples/server-communication/dart/pubspec.yaml b/public/docs/_examples/server-communication/dart/pubspec.yaml index 217cb4edcc..3d8e06cbe0 100644 --- a/public/docs/_examples/server-communication/dart/pubspec.yaml +++ b/public/docs/_examples/server-communication/dart/pubspec.yaml @@ -11,7 +11,7 @@ dependencies: http: ^0.11.3+3 jsonpadding: ^0.1.0 stream_transformers: ^0.3.0+3 - http_in_memory_web_api: ^0.0.1 + http_in_memory_web_api: ^0.2.0 # #docregion transformers transformers: - angular2: From d2e6046ffce189d4423fdff8873de89c5a970ee1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ad=C3=A3o=20J=C3=BAnior?= Date: Thu, 28 Jul 2016 14:12:19 -0300 Subject: [PATCH 2/2] remove todo and drop the ?? body term --- .../server-communication/dart/lib/toh/hero_service.dart | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/public/docs/_examples/server-communication/dart/lib/toh/hero_service.dart b/public/docs/_examples/server-communication/dart/lib/toh/hero_service.dart index 5da269fff7..dd16fe70cd 100644 --- a/public/docs/_examples/server-communication/dart/lib/toh/hero_service.dart +++ b/public/docs/_examples/server-communication/dart/lib/toh/hero_service.dart @@ -50,9 +50,7 @@ class HeroService { // #docregion extract-data dynamic _extractData(Response res) { var body = JSON.decode(res.body); - // TODO: https://github.com/adaojunior/http-in-memory-web-api/issues/1 - // Once #1 is fixed, drop the `?? body` term: - return body['data'] ?? body; + return body['data']; } // #enddocregion extract-data // #docregion error-handling