Skip to content
This repository was archived by the owner on Feb 22, 2018. It is now read-only.

Commit 1f858d8

Browse files
committed
removing empty onError clauses
1 parent c5e2dae commit 1f858d8

File tree

2 files changed

+8
-12
lines changed

2 files changed

+8
-12
lines changed

Chapter_05/recipe_book_router.dart

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,21 @@ class RecipeBookRouteInitializer implements RouteInitializer {
55
init(Router router, ViewFactory view) {
66
router.root
77
..addRoute(
8-
name: 'add', // recipe_add
9-
path: '/add', // /recipe/add
10-
enter: view('view/add.html')) // recipe_add.html
8+
name: 'add',
9+
path: '/add',
10+
enter: view('view/add.html'))
1111
..addRoute(
1212
name: 'recipe',
1313
path: '/recipe/:recipeId',
1414
mount: (Route route) => route
1515
..addRoute(
16-
name: 'view', // recipe
17-
path: '/view', // delete this
18-
enter: view('view/view.html')) // recipe.html
16+
name: 'view',
17+
path: '/view',
18+
enter: view('view/view.html'))
1919
..addRoute(
20-
name: 'edit', // recipe_edit
20+
name: 'edit',
2121
path: '/edit',
22-
enter: view('view/edit.html')) // recipe_edit.html
22+
enter: view('view/edit.html'))
2323
..addRoute(
2424
name: 'view_default',
2525
defaultRoute: true,

Chapter_05/service/query_service.dart

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,6 @@ class QueryService {
2424
_recipesCache[r.id] = r;
2525
}
2626
return _recipesCache.length;
27-
},
28-
onError: (Object obj) {
2927
});
3028
}
3129

@@ -37,8 +35,6 @@ class QueryService {
3735
_categoriesCache.add(category);
3836
}
3937
return _categoriesCache.length;
40-
},
41-
onError: (Object obj) {
4238
});
4339
}
4440

0 commit comments

Comments
 (0)