Search post

This commit is contained in:
2024-11-23 19:06:09 +08:00
parent d64a24454d
commit dfd80021b9
6 changed files with 215 additions and 6 deletions

View File

@ -17,6 +17,7 @@ import 'package:surface/screens/home.dart';
import 'package:surface/screens/notification.dart';
import 'package:surface/screens/post/post_detail.dart';
import 'package:surface/screens/post/post_editor.dart';
import 'package:surface/screens/post/post_search.dart';
import 'package:surface/screens/realm.dart';
import 'package:surface/screens/realm/manage.dart';
import 'package:surface/screens/settings.dart';
@ -64,11 +65,17 @@ final _appRoutes = [
),
),
),
GoRoute(
path: '/post/search',
name: 'postSearch',
builder: (context, state) => const AppBackground(
child: PostSearchScreen(),
),
),
GoRoute(
path: '/post/:slug',
name: 'postDetail',
builder: (context, state) => AppBackground(
isLessOptimization: true,
child: PostDetailScreen(
slug: state.pathParameters['slug']!,
preload: state.extra as SnPost?,