Skip to content

Commit 73bb8b2

Browse files
committed
Reverting to new X<>() notation rather than [] or {}
1 parent 4098e77 commit 73bb8b2

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Chapter_06/lib/service/query_service.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class QueryService {
2323
Future _loadRecipes() {
2424
return _http.get(_recipesUrl)
2525
.then((HttpResponse response) {
26-
_recipesCache = <String, Recipe>{};
26+
_recipesCache = new Map<String, Recipe>();
2727
for (Map recipe in response.data) {
2828
Recipe r = new Recipe.fromJson(recipe);
2929
_recipesCache[r.id] = r;
@@ -34,7 +34,7 @@ class QueryService {
3434
Future _loadCategories() {
3535
return _http.get(_categoriesUrl)
3636
.then((HttpResponse response) {
37-
_categoriesCache = <String>[];
37+
_categoriesCache = new List<String>();
3838
for (String category in response.data) {
3939
_categoriesCache.add(category);
4040
}

Chapter_07/lib/service/query_service.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class QueryService {
2323
Future _loadRecipes() {
2424
return _http.get(_recipesUrl)
2525
.then((HttpResponse response) {
26-
_recipesCache = <String, Recipe>{};
26+
_recipesCache = new Map<String, Recipe>();
2727
for (Map recipe in response.data) {
2828
Recipe r = new Recipe.fromJson(recipe);
2929
_recipesCache[r.id] = r;
@@ -34,7 +34,7 @@ class QueryService {
3434
Future _loadCategories() {
3535
return _http.get(_categoriesUrl)
3636
.then((HttpResponse response) {
37-
_categoriesCache = <String>[];
37+
_categoriesCache = new List<String>();
3838
for (String category in response.data) {
3939
_categoriesCache.add(category);
4040
}

0 commit comments

Comments
 (0)