mirror of
https://github.com/Dr-Blank/Vaani.git
synced 2025-12-25 20:39:31 +00:00
fix: improve navigation stack and ensure square cover aspect ratios
Navigation fixes: - Change goNamed to pushNamed in all library browser pages - Maintains proper back navigation stack - Back button now goes step by step instead of to beginning - Prevents app from closing when navigating back from book detail Grid layout fixes: - Book covers are now always square (1.0 aspect ratio) - Overall card aspect ratio is 0.75 to provide space for text - Wrap cover in AspectRatio widget instead of using Expanded - Ensures title and author info always visible below covers - Fixes issue where book info was missing in series view
This commit is contained in:
parent
cf0778e263
commit
8667bd03dd
4 changed files with 8 additions and 7 deletions
|
|
@ -77,7 +77,7 @@ class FilteredLibraryItemsPage extends HookConsumerWidget {
|
|||
padding: const EdgeInsets.all(16),
|
||||
gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount(
|
||||
crossAxisCount: 3,
|
||||
childAspectRatio: 0.65,
|
||||
childAspectRatio: 0.75,
|
||||
crossAxisSpacing: 12,
|
||||
mainAxisSpacing: 16,
|
||||
),
|
||||
|
|
@ -192,7 +192,7 @@ class LibraryItemCard extends ConsumerWidget {
|
|||
return InkWell(
|
||||
onTap: () {
|
||||
// Navigate to item detail page
|
||||
context.goNamed(
|
||||
context.pushNamed(
|
||||
Routes.libraryItem.name,
|
||||
pathParameters: {'itemId': item.id},
|
||||
);
|
||||
|
|
@ -200,8 +200,9 @@ class LibraryItemCard extends ConsumerWidget {
|
|||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||
children: [
|
||||
// Book cover
|
||||
Expanded(
|
||||
// Book cover - always square
|
||||
AspectRatio(
|
||||
aspectRatio: 1.0,
|
||||
child: ClipRRect(
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
child: imageUrl != null
|
||||
|
|
|
|||
|
|
@ -105,7 +105,7 @@ class AuthorCard extends HookConsumerWidget {
|
|||
child: InkWell(
|
||||
onTap: () {
|
||||
// Navigate to filtered items page with author filter
|
||||
context.goNamed(
|
||||
context.pushNamed(
|
||||
Routes.libraryFiltered.name,
|
||||
extra: {
|
||||
'filter': AuthorFilter(author.id),
|
||||
|
|
|
|||
|
|
@ -86,7 +86,7 @@ class GenreListTile extends StatelessWidget {
|
|||
trailing: const Icon(Icons.chevron_right),
|
||||
onTap: () {
|
||||
// Navigate to filtered items page with genre filter
|
||||
context.goNamed(
|
||||
context.pushNamed(
|
||||
Routes.libraryFiltered.name,
|
||||
extra: {
|
||||
'filter': GenreFilter(genre),
|
||||
|
|
|
|||
|
|
@ -110,7 +110,7 @@ class SeriesListTile extends StatelessWidget {
|
|||
trailing: const Icon(Icons.chevron_right),
|
||||
onTap: () {
|
||||
// Navigate to filtered items page with series filter
|
||||
context.goNamed(
|
||||
context.pushNamed(
|
||||
Routes.libraryFiltered.name,
|
||||
extra: {
|
||||
'filter': SeriesFilter(series.id),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue