From 2c04c9a5f071ce01b8048fbd673d816ce9ea9e68 Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 1 Jul 2018 12:00:57 -0700 Subject: [PATCH] Refactor --- lib/redux/app/app_middleware.dart | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/lib/redux/app/app_middleware.dart b/lib/redux/app/app_middleware.dart index 68e538512..9f2f3d96f 100644 --- a/lib/redux/app/app_middleware.dart +++ b/lib/redux/app/app_middleware.dart @@ -168,19 +168,19 @@ Middleware _createLoadState( isFirst = false; }); } - }).catchError((error) => _handleError(store, error, action.context)); - }).catchError((error) => _handleError(store, error, action.context)); - }).catchError((error) => _handleError(store, error, action.context)); - }).catchError((error) => _handleError(store, error, action.context)); - }).catchError((error) => _handleError(store, error, action.context)); - }).catchError((error) => _handleError(store, error, action.context)); - }).catchError((error) => _handleError(store, error, action.context)); - }).catchError((error) => _handleError(store, error, action.context)); + }).catchError((Object error) => _handleError(store, error, action.context)); + }).catchError((Object error) => _handleError(store, error, action.context)); + }).catchError((Object error) => _handleError(store, error, action.context)); + }).catchError((Object error) => _handleError(store, error, action.context)); + }).catchError((Object error) => _handleError(store, error, action.context)); + }).catchError((Object error) => _handleError(store, error, action.context)); + }).catchError((Object error) => _handleError(store, error, action.context)); + }).catchError((Object error) => _handleError(store, error, action.context)); } else { store.dispatch(UserLogout()); store.dispatch(LoadUserLogin(action.context)); } - }).catchError((error) => _handleError(store, error, action.context)); + }).catchError((Object error) => _handleError(store, error, action.context)); next(action); }; @@ -217,7 +217,7 @@ List _getRoutes(AppState state) { return routes; } -_handleError(store, error, context) { +void _handleError(Store store, Object error, BuildContext context) { print(error); store.dispatch(UserLogout()); store.dispatch(LoadUserLogin(context));