💄 Swipe style post shuffle

This commit is contained in:
2026-01-02 17:49:14 +08:00
parent a44552f105
commit f1f5113b01
3 changed files with 184 additions and 115 deletions

View File

@@ -169,6 +169,7 @@ final routerProvider = Provider<GoRouter>((ref) {
builder: (context, state) => const AboutScreen(),
),
// File routes
GoRoute(
name: 'fileDetail',
path: '/files/:id',
@@ -184,6 +185,34 @@ final routerProvider = Provider<GoRouter>((ref) {
return const SizedBox.shrink();
},
),
// Post routes
GoRoute(
name: 'postShuffle',
path: '/posts/shuffle',
builder: (context, state) => const PostShuffleScreen(),
),
GoRoute(
name: 'postCategories',
path: '/posts/categories',
builder: (context, state) => const PostCategoriesListScreen(),
),
GoRoute(
name: 'postCategoryDetail',
path: '/posts/categories/:slug',
builder: (context, state) {
final slug = state.pathParameters['slug']!;
return PostCategoryDetailScreen(slug: slug, isCategory: true);
},
),
GoRoute(
name: 'postTagDetail',
path: '/posts/tags/:slug',
builder: (context, state) {
final slug = state.pathParameters['slug']!;
return PostCategoryDetailScreen(slug: slug, isCategory: false);
},
),
GoRoute(
name: 'postDetail',
path: '/posts/:id',
@@ -234,35 +263,7 @@ final routerProvider = Provider<GoRouter>((ref) {
transitionsBuilder: _tabPagesTransitionBuilder,
),
),
GoRoute(
name: 'postShuffle',
path: '/posts/shuffle',
builder: (context, state) => const PostShuffleScreen(),
),
GoRoute(
name: 'postCategories',
path: '/posts/categories',
builder: (context, state) => const PostCategoriesListScreen(),
),
GoRoute(
name: 'postCategoryDetail',
path: '/posts/categories/:slug',
builder: (context, state) {
final slug = state.pathParameters['slug']!;
return PostCategoryDetailScreen(slug: slug, isCategory: true);
},
),
GoRoute(
name: 'postTagDetail',
path: '/posts/tags/:slug',
builder: (context, state) {
final slug = state.pathParameters['slug']!;
return PostCategoryDetailScreen(
slug: slug,
isCategory: false,
);
},
),
GoRoute(
name: 'discoveryRealms',
path: '/discovery/realms',