feature: Rework responsive layout (#217)

Co-authored-by: PartyDonut <PartyDonut@users.noreply.github.com>
This commit is contained in:
PartyDonut 2025-02-07 15:55:01 +01:00 committed by GitHub
parent e07f280124
commit 8012fdcea8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
48 changed files with 1468 additions and 1040 deletions

View file

@ -94,7 +94,7 @@ class _DashboardScreenState extends ConsumerState<DashboardScreen> {
controller: AdaptiveLayout.scrollOf(context),
physics: const AlwaysScrollableScrollPhysics(),
slivers: [
if (AdaptiveLayout.of(context).layout == LayoutState.phone)
if (AdaptiveLayout.viewSizeOf(context) == ViewSize.phone)
NestedSliverAppBar(
route: LibrarySearchRoute(),
parent: context,
@ -102,7 +102,7 @@ class _DashboardScreenState extends ConsumerState<DashboardScreen> {
if (homeBanner && homeCarouselItems.isNotEmpty) ...{
SliverToBoxAdapter(
child: Transform.translate(
offset: Offset(0, AdaptiveLayout.layoutOf(context) == LayoutState.phone ? -14 : 0),
offset: Offset(0, AdaptiveLayout.layoutOf(context) == ViewSize.phone ? -14 : 0),
child: HomeBannerWidget(posters: homeCarouselItems),
),
),