Skip to content

Commit

Permalink
feat(app): no route transition after tutorial
Browse files Browse the repository at this point in the history
  • Loading branch information
tamslo committed Jan 22, 2025
1 parent d75bbd0 commit 92b9413
Showing 1 changed file with 16 additions and 5 deletions.
21 changes: 16 additions & 5 deletions app/lib/main/module.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,19 @@ import '../common/module.dart';
// For generated route
export 'pages/main.dart';

AutoRoute mainRoute({ required List<AutoRoute> children }) => AutoRoute(
path: '/main',
page: MainRoute.page,
children: children,
);
const _path = '/main';
const _page = MainRoute.page;

AutoRoute mainRoute({ required List<AutoRoute> children }) =>
MetaData.instance.tutorialDone ?? false
? AutoRoute(
path: _path,
page: _page,
children: children,
)
: CustomRoute(
path: _path,
page: _page,
children: children,
transitionsBuilder: TransitionsBuilders.noTransition,
) ;

0 comments on commit 92b9413

Please sign in to comment.