Add hero to category, increase appbar height (#42)
This commit is contained in:
parent
c811e773b5
commit
13631bac4d
2 changed files with 16 additions and 12 deletions
|
|
@ -35,8 +35,11 @@ class CategoryCard extends StatelessWidget {
|
|||
child: Column(
|
||||
children: [
|
||||
Expanded(
|
||||
child: CachedNetworkImage(
|
||||
imageUrl: category.boxArtUrl.replaceFirst('-{width}x{height}', '-138x184'),
|
||||
child: Hero(
|
||||
tag: category.id,
|
||||
child: CachedNetworkImage(
|
||||
imageUrl: category.boxArtUrl.replaceFirst('-{width}x{height}', '-300x400'),
|
||||
),
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 5),
|
||||
|
|
|
|||
|
|
@ -23,21 +23,22 @@ class CategoryStreams extends StatelessWidget {
|
|||
SliverAppBar(
|
||||
stretch: true,
|
||||
pinned: true,
|
||||
expandedHeight: MediaQuery.of(context).size.height / 8,
|
||||
expandedHeight: MediaQuery.of(context).size.height / 3,
|
||||
flexibleSpace: FlexibleSpaceBar(
|
||||
centerTitle: true,
|
||||
stretchModes: const [
|
||||
StretchMode.zoomBackground,
|
||||
],
|
||||
title: Text(
|
||||
store.categoryInfo.name,
|
||||
style: Theme.of(context).textTheme.headline6?.copyWith(fontWeight: FontWeight.bold),
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
background: CachedNetworkImage(
|
||||
imageUrl: store.categoryInfo.boxArtUrl.replaceFirst('-{width}x{height}', '-300x400'),
|
||||
color: const Color.fromRGBO(255, 255, 255, 0.5),
|
||||
colorBlendMode: BlendMode.modulate,
|
||||
fit: BoxFit.fitWidth,
|
||||
background: Hero(
|
||||
tag: store.categoryInfo.id,
|
||||
child: CachedNetworkImage(
|
||||
imageUrl: store.categoryInfo.boxArtUrl.replaceFirst('-{width}x{height}', '-300x400'),
|
||||
color: const Color.fromRGBO(255, 255, 255, 0.5),
|
||||
colorBlendMode: BlendMode.modulate,
|
||||
fit: BoxFit.cover,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue