mirror of
https://github.com/Dr-Blank/Vaani.git
synced 2025-12-26 12:59:30 +00:00
routes
This commit is contained in:
parent
ebc14a0448
commit
f8597f7430
13 changed files with 509 additions and 33 deletions
38
lib/pages/library_item_page.dart
Normal file
38
lib/pages/library_item_page.dart
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||
import 'package:whispering_pages/api/api_provider.dart';
|
||||
import 'package:whispering_pages/extensions/hero_tag_conventions.dart';
|
||||
import 'package:whispering_pages/router/models/library_item_extras.dart';
|
||||
|
||||
class LibraryItemPage extends HookConsumerWidget {
|
||||
const LibraryItemPage({
|
||||
super.key,
|
||||
required this.itemId,
|
||||
this.extra,
|
||||
});
|
||||
|
||||
final String itemId;
|
||||
final Object? extra;
|
||||
@override
|
||||
Widget build(BuildContext context, WidgetRef ref) {
|
||||
final views = ref.watch(personalizedViewProvider);
|
||||
final extraMap =
|
||||
extra is LibraryItemExtras ? extra as LibraryItemExtras : null;
|
||||
|
||||
return Scaffold(
|
||||
appBar: AppBar(),
|
||||
body: Center(
|
||||
child: Hero(
|
||||
tag: HeroTagPrefixes.bookCover +
|
||||
itemId +
|
||||
(extraMap?.heroTagSuffix ?? ''),
|
||||
child: Container(
|
||||
color: Colors.amber,
|
||||
height: 200,
|
||||
width: 200,
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue