diff --git a/lib/routes.dart b/lib/routes.dart index 85cdd9847..8ba2ba968 100644 --- a/lib/routes.dart +++ b/lib/routes.dart @@ -266,7 +266,7 @@ final List routes = [ redirect: (state) { // Redirect to TostiScreen if not authenticated. // TODO: Is there a nicer way to pass tosti api to other pages? - if (state.extra is TostiApiRepository) return '/tosti'; + if (state.extra is! TostiApiRepository) return '/tosti'; return null; }, pageBuilder: (context, state) => MaterialPage(