Created
December 11, 2025 07:09
-
-
Save definev/6f8f98c5380565364d0e145599db1d08 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // GENERATED CODE - DO NOT MODIFY BY HAND | |
| // ignore_for_file: type=lint | |
| import 'package:zenrouter/zenrouter.dart'; | |
| import '(auth)/_layout.dart'; | |
| import '(auth)/login.dart' deferred as auth_login; | |
| import '(auth)/register.dart' deferred as auth_register; | |
| import 'about.dart' deferred as about; | |
| import 'index.dart' deferred as index; | |
| import 'not_found.dart' deferred as not_found; | |
| import 'profile/[profileId]/collections/[collectionId].dart' | |
| deferred as profile_collections_collectionId; | |
| import 'profile/[profileId]/index.dart' deferred as profile_profileId; | |
| import 'profile/general.dart' deferred as profile_general; | |
| import 'tabs/_layout.dart'; | |
| import 'tabs/feed/_layout.dart'; | |
| import 'tabs/feed/following/[...slugs]/[id].dart' | |
| deferred as tabs_feed_following_id; | |
| import 'tabs/feed/following/[...slugs]/about.dart' | |
| deferred as tabs_feed_following_about; | |
| import 'tabs/feed/following/[...slugs]/index.dart' | |
| deferred as tabs_feed_following_slugs_index; | |
| import 'tabs/feed/following/[postId].dart' | |
| deferred as tabs_feed_following_postId; | |
| import 'tabs/feed/following/_layout.dart'; | |
| import 'tabs/feed/following/index.dart' deferred as tabs_feed_following_index; | |
| import 'tabs/feed/for-you/_layout.dart'; | |
| import 'tabs/feed/for-you/index.dart' deferred as tabs_feed_for_you_index; | |
| import 'tabs/feed/for-you/sheet.dart' deferred as tabs_feed_for_you_sheet; | |
| import 'tabs/profile.dart'; | |
| import 'tabs/settings.dart'; | |
| export 'package:zenrouter/zenrouter.dart'; | |
| export '(auth)/_layout.dart'; | |
| export '(auth)/login.dart'; | |
| export '(auth)/register.dart'; | |
| export 'about.dart'; | |
| export 'index.dart'; | |
| export 'not_found.dart'; | |
| export 'profile/[profileId]/collections/[collectionId].dart'; | |
| export 'profile/[profileId]/index.dart'; | |
| export 'profile/general.dart'; | |
| export 'tabs/_layout.dart'; | |
| export 'tabs/feed/_layout.dart'; | |
| export 'tabs/feed/following/[...slugs]/[id].dart'; | |
| export 'tabs/feed/following/[...slugs]/about.dart'; | |
| export 'tabs/feed/following/[...slugs]/index.dart'; | |
| export 'tabs/feed/following/[postId].dart'; | |
| export 'tabs/feed/following/_layout.dart'; | |
| export 'tabs/feed/following/index.dart'; | |
| export 'tabs/feed/for-you/_layout.dart'; | |
| export 'tabs/feed/for-you/index.dart'; | |
| export 'tabs/feed/for-you/sheet.dart'; | |
| export 'tabs/profile.dart'; | |
| export 'tabs/settings.dart'; | |
| /// Base class for all routes in this application. | |
| abstract class AppRoute extends RouteTarget with RouteUnique {} | |
| /// Generated coordinator managing all routes. | |
| class AppCoordinator extends Coordinator<AppRoute> { | |
| final NavigationPath<AppRoute> authPath = NavigationPath('Auth'); | |
| final IndexedStackPath<AppRoute> tabsPath = IndexedStackPath([ | |
| FeedTabLayout(), | |
| TabProfileRoute(), | |
| TabSettingsRoute(), | |
| ], 'Tabs'); | |
| final IndexedStackPath<AppRoute> feedTabPath = IndexedStackPath([ | |
| FollowingLayout(), | |
| ForYouLayout(), | |
| ], 'FeedTab'); | |
| final NavigationPath<AppRoute> followingPath = NavigationPath('Following'); | |
| final NavigationPath<AppRoute> forYouPath = NavigationPath('ForYou'); | |
| @override | |
| List<StackPath> get paths => [ | |
| root, | |
| authPath, | |
| tabsPath, | |
| feedTabPath, | |
| followingPath, | |
| forYouPath, | |
| ]; | |
| @override | |
| void defineLayout() { | |
| RouteLayout.defineLayout(AuthLayout, () => AuthLayout()); | |
| RouteLayout.defineLayout(TabsLayout, () => TabsLayout()); | |
| RouteLayout.defineLayout(FeedTabLayout, () => FeedTabLayout()); | |
| RouteLayout.defineLayout(FollowingLayout, () => FollowingLayout()); | |
| RouteLayout.defineLayout(ForYouLayout, () => ForYouLayout()); | |
| } | |
| @override | |
| Future<AppRoute> parseRouteFromUri(Uri uri) async { | |
| return switch (uri.pathSegments) { | |
| [] => await () async { | |
| await index.loadLibrary(); | |
| return index.IndexRoute(); | |
| }(), | |
| ['tabs', 'feed', 'for-you', 'sheet'] => await () async { | |
| await tabs_feed_for_you_sheet.loadLibrary(); | |
| return tabs_feed_for_you_sheet.ForYouSheetRoute(); | |
| }(), | |
| ['tabs', 'feed', 'following', final postId] => await () async { | |
| await tabs_feed_following_postId.loadLibrary(); | |
| return tabs_feed_following_postId.FeedPostRoute(postId: postId); | |
| }(), | |
| ['tabs', 'feed', 'following'] => await () async { | |
| await tabs_feed_following_index.loadLibrary(); | |
| return tabs_feed_following_index.FollowingRoute(); | |
| }(), | |
| ['tabs', 'feed', 'for-you'] => await () async { | |
| await tabs_feed_for_you_index.loadLibrary(); | |
| return tabs_feed_for_you_index.ForYouRoute(); | |
| }(), | |
| ['profile', final profileId, 'collections', final collectionId] => | |
| await () async { | |
| await profile_collections_collectionId.loadLibrary(); | |
| return profile_collections_collectionId.CollectionsCollectionIdRoute( | |
| profileId: profileId, | |
| collectionId: collectionId, | |
| queries: uri.queryParameters, | |
| ); | |
| }(), | |
| ['profile', 'general'] => await () async { | |
| await profile_general.loadLibrary(); | |
| return profile_general.ProfileGeneralRoute(); | |
| }(), | |
| ['tabs', 'profile'] => TabProfileRoute(), | |
| ['tabs', 'settings'] => TabSettingsRoute(), | |
| ['profile', final profileId] => await () async { | |
| await profile_profileId.loadLibrary(); | |
| return profile_profileId.ProfileIdRoute(profileId: profileId); | |
| }(), | |
| ['login'] => await () async { | |
| await auth_login.loadLibrary(); | |
| return auth_login.LoginRoute(); | |
| }(), | |
| ['register'] => await () async { | |
| await auth_register.loadLibrary(); | |
| return auth_register.RegisterRoute(); | |
| }(), | |
| ['about'] => await () async { | |
| await about.loadLibrary(); | |
| return about.AboutRoute(); | |
| }(), | |
| ['tabs', 'feed', 'following', ...final slugs, 'about'] => await () async { | |
| await tabs_feed_following_about.loadLibrary(); | |
| return tabs_feed_following_about.FeedDynamicAboutRoute(slugs: slugs); | |
| }(), | |
| ['tabs', 'feed', 'following', ...final slugs, final id] => | |
| await () async { | |
| await tabs_feed_following_id.loadLibrary(); | |
| return tabs_feed_following_id.FeedDynamicIdRoute( | |
| slugs: slugs, | |
| id: id, | |
| ); | |
| }(), | |
| ['tabs', 'feed', 'following', ...final slugs] => await () async { | |
| await tabs_feed_following_slugs_index.loadLibrary(); | |
| return tabs_feed_following_slugs_index.FeedDynamicRoute(slugs: slugs); | |
| }(), | |
| _ => await () async { | |
| await not_found.loadLibrary(); | |
| return not_found.NotFoundRoute(uri: uri, queries: uri.queryParameters); | |
| }(), | |
| }; | |
| } | |
| } | |
| /// Type-safe navigation extension methods. | |
| extension AppCoordinatorNav on AppCoordinator { | |
| Future<T?> pushLogin<T extends Object>() async => push(await () async { | |
| await auth_login.loadLibrary(); | |
| return auth_login.LoginRoute(); | |
| }()); | |
| Future<void> replaceLogin() async => replace(await () async { | |
| await auth_login.loadLibrary(); | |
| return auth_login.LoginRoute(); | |
| }()); | |
| Future<void> recoverLogin() async => recover(await () async { | |
| await auth_login.loadLibrary(); | |
| return auth_login.LoginRoute(); | |
| }()); | |
| Future<T?> pushRegister<T extends Object>() async => push(await () async { | |
| await auth_register.loadLibrary(); | |
| return auth_register.RegisterRoute(); | |
| }()); | |
| void replaceRegister() async => replace(await () async { | |
| await auth_register.loadLibrary(); | |
| return auth_register.RegisterRoute(); | |
| }()); | |
| void recoverRegister() async => recover(await () async { | |
| await auth_register.loadLibrary(); | |
| return auth_register.RegisterRoute(); | |
| }()); | |
| Future<T?> pushAbout<T extends Object>() async => push(await () async { | |
| await about.loadLibrary(); | |
| return about.AboutRoute(); | |
| }()); | |
| void replaceAbout() async => replace(await () async { | |
| await about.loadLibrary(); | |
| return about.AboutRoute(); | |
| }()); | |
| void recoverAbout() async => recover(await () async { | |
| await about.loadLibrary(); | |
| return about.AboutRoute(); | |
| }()); | |
| Future<T?> pushIndex<T extends Object>() async => push(await () async { | |
| await index.loadLibrary(); | |
| return index.IndexRoute(); | |
| }()); | |
| void replaceIndex() async => replace(await () async { | |
| await index.loadLibrary(); | |
| return index.IndexRoute(); | |
| }()); | |
| void recoverIndex() async => recover(await () async { | |
| await index.loadLibrary(); | |
| return index.IndexRoute(); | |
| }()); | |
| Future<T?> pushCollectionsCollectionId<T extends Object>( | |
| String profileId, | |
| String collectionId, [ | |
| Map<String, String> queries = const {}, | |
| ]) async => push(await () async { | |
| await profile_collections_collectionId.loadLibrary(); | |
| return profile_collections_collectionId.CollectionsCollectionIdRoute( | |
| profileId: profileId, | |
| collectionId: collectionId, | |
| queries: queries, | |
| ); | |
| }()); | |
| void replaceCollectionsCollectionId( | |
| String profileId, | |
| String collectionId, [ | |
| Map<String, String> queries = const {}, | |
| ]) async => replace(await () async { | |
| await profile_collections_collectionId.loadLibrary(); | |
| return profile_collections_collectionId.CollectionsCollectionIdRoute( | |
| profileId: profileId, | |
| collectionId: collectionId, | |
| queries: queries, | |
| ); | |
| }()); | |
| void recoverCollectionsCollectionId( | |
| String profileId, | |
| String collectionId, [ | |
| Map<String, String> queries = const {}, | |
| ]) async => recover(await () async { | |
| await profile_collections_collectionId.loadLibrary(); | |
| return profile_collections_collectionId.CollectionsCollectionIdRoute( | |
| profileId: profileId, | |
| collectionId: collectionId, | |
| queries: queries, | |
| ); | |
| }()); | |
| Future<T?> pushProfileId<T extends Object>(String profileId) async => | |
| push(await () async { | |
| await profile_profileId.loadLibrary(); | |
| return profile_profileId.ProfileIdRoute(profileId: profileId); | |
| }()); | |
| void replaceProfileId(String profileId) async => replace(await () async { | |
| await profile_profileId.loadLibrary(); | |
| return profile_profileId.ProfileIdRoute(profileId: profileId); | |
| }()); | |
| void recoverProfileId(String profileId) async => recover(await () async { | |
| await profile_profileId.loadLibrary(); | |
| return profile_profileId.ProfileIdRoute(profileId: profileId); | |
| }()); | |
| Future<T?> pushProfileGeneral<T extends Object>() async => | |
| push(await () async { | |
| await profile_general.loadLibrary(); | |
| return profile_general.ProfileGeneralRoute(); | |
| }()); | |
| void replaceProfileGeneral() async => replace(await () async { | |
| await profile_general.loadLibrary(); | |
| return profile_general.ProfileGeneralRoute(); | |
| }()); | |
| void recoverProfileGeneral() async => recover(await () async { | |
| await profile_general.loadLibrary(); | |
| return profile_general.ProfileGeneralRoute(); | |
| }()); | |
| Future<T?> pushFeedDynamicId<T extends Object>( | |
| List<String> slugs, | |
| String id, | |
| ) async => push(await () async { | |
| await tabs_feed_following_id.loadLibrary(); | |
| return tabs_feed_following_id.FeedDynamicIdRoute(slugs: slugs, id: id); | |
| }()); | |
| void replaceFeedDynamicId(List<String> slugs, String id) async => | |
| replace(await () async { | |
| await tabs_feed_following_id.loadLibrary(); | |
| return tabs_feed_following_id.FeedDynamicIdRoute(slugs: slugs, id: id); | |
| }()); | |
| void recoverFeedDynamicId(List<String> slugs, String id) async => | |
| recover(await () async { | |
| await tabs_feed_following_id.loadLibrary(); | |
| return tabs_feed_following_id.FeedDynamicIdRoute(slugs: slugs, id: id); | |
| }()); | |
| Future<T?> pushFeedDynamicAbout<T extends Object>(List<String> slugs) async => | |
| push(await () async { | |
| await tabs_feed_following_about.loadLibrary(); | |
| return tabs_feed_following_about.FeedDynamicAboutRoute(slugs: slugs); | |
| }()); | |
| void replaceFeedDynamicAbout(List<String> slugs) async => | |
| replace(await () async { | |
| await tabs_feed_following_about.loadLibrary(); | |
| return tabs_feed_following_about.FeedDynamicAboutRoute(slugs: slugs); | |
| }()); | |
| void recoverFeedDynamicAbout(List<String> slugs) async => | |
| recover(await () async { | |
| await tabs_feed_following_about.loadLibrary(); | |
| return tabs_feed_following_about.FeedDynamicAboutRoute(slugs: slugs); | |
| }()); | |
| Future<T?> pushFeedDynamic<T extends Object>(List<String> slugs) async => | |
| push(await () async { | |
| await tabs_feed_following_slugs_index.loadLibrary(); | |
| return tabs_feed_following_slugs_index.FeedDynamicRoute(slugs: slugs); | |
| }()); | |
| void replaceFeedDynamic(List<String> slugs) async => replace(await () async { | |
| await tabs_feed_following_slugs_index.loadLibrary(); | |
| return tabs_feed_following_slugs_index.FeedDynamicRoute(slugs: slugs); | |
| }()); | |
| void recoverFeedDynamic(List<String> slugs) async => recover(await () async { | |
| await tabs_feed_following_slugs_index.loadLibrary(); | |
| return tabs_feed_following_slugs_index.FeedDynamicRoute(slugs: slugs); | |
| }()); | |
| Future<T?> pushFeedPost<T extends Object>(String postId) async => | |
| push(await () async { | |
| await tabs_feed_following_postId.loadLibrary(); | |
| return tabs_feed_following_postId.FeedPostRoute(postId: postId); | |
| }()); | |
| void replaceFeedPost(String postId) async => replace(await () async { | |
| await tabs_feed_following_postId.loadLibrary(); | |
| return tabs_feed_following_postId.FeedPostRoute(postId: postId); | |
| }()); | |
| void recoverFeedPost(String postId) async => recover(await () async { | |
| await tabs_feed_following_postId.loadLibrary(); | |
| return tabs_feed_following_postId.FeedPostRoute(postId: postId); | |
| }()); | |
| Future<T?> pushFollowing<T extends Object>() async => push(await () async { | |
| await tabs_feed_following_index.loadLibrary(); | |
| return tabs_feed_following_index.FollowingRoute(); | |
| }()); | |
| void replaceFollowing() async => replace(await () async { | |
| await tabs_feed_following_index.loadLibrary(); | |
| return tabs_feed_following_index.FollowingRoute(); | |
| }()); | |
| void recoverFollowing() async => recover(await () async { | |
| await tabs_feed_following_index.loadLibrary(); | |
| return tabs_feed_following_index.FollowingRoute(); | |
| }()); | |
| Future<T?> pushForYou<T extends Object>() async => push(await () async { | |
| await tabs_feed_for_you_index.loadLibrary(); | |
| return tabs_feed_for_you_index.ForYouRoute(); | |
| }()); | |
| void replaceForYou() async => replace(await () async { | |
| await tabs_feed_for_you_index.loadLibrary(); | |
| return tabs_feed_for_you_index.ForYouRoute(); | |
| }()); | |
| void recoverForYou() async => recover(await () async { | |
| await tabs_feed_for_you_index.loadLibrary(); | |
| return tabs_feed_for_you_index.ForYouRoute(); | |
| }()); | |
| Future<T?> pushForYouSheet<T extends Object>() async => push(await () async { | |
| await tabs_feed_for_you_sheet.loadLibrary(); | |
| return tabs_feed_for_you_sheet.ForYouSheetRoute(); | |
| }()); | |
| void replaceForYouSheet() async => replace(await () async { | |
| await tabs_feed_for_you_sheet.loadLibrary(); | |
| return tabs_feed_for_you_sheet.ForYouSheetRoute(); | |
| }()); | |
| void recoverForYouSheet() async => recover(await () async { | |
| await tabs_feed_for_you_sheet.loadLibrary(); | |
| return tabs_feed_for_you_sheet.ForYouSheetRoute(); | |
| }()); | |
| Future<T?> pushTabProfile<T extends Object>() => push(TabProfileRoute()); | |
| void replaceTabProfile() => replace(TabProfileRoute()); | |
| void recoverTabProfile() => recover(TabProfileRoute()); | |
| Future<T?> pushTabSettings<T extends Object>() => push(TabSettingsRoute()); | |
| void replaceTabSettings() => replace(TabSettingsRoute()); | |
| void recoverTabSettings() => recover(TabSettingsRoute()); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment