Fix gallery's title can not display correct on chrome/firefox

This commit is contained in:
2023-09-14 21:00:33 +08:00
parent 0ffc08c624
commit a58732f788
4 changed files with 55 additions and 20 deletions

View File

@@ -59,9 +59,13 @@ final _router = GoRouter(
}),
GoRoute(
path: GalleryPage.routeName,
builder: (context, state) => GalleryPage(
int.parse(state.pathParameters["gid"]!),
),
builder: (context, state) {
final extra = state.extra as GalleryPageExtra?;
return GalleryPage(
int.parse(state.pathParameters["gid"]!),
title: extra?.title,
);
},
redirect: (context, state) {
try {
int.parse(state.pathParameters["gid"]!);