mirror of
https://github.com/gabehf/Fladder.git
synced 2026-03-16 10:46:00 -07:00
feature: Add new home carousel (#58)
## Pull Request Description This adds a new home carousel better suited for mobile The old one is still available ## Checklist - [x] If a new package was added, did you ensure it works for all supported platforms? Is the package also well maintained? - [x] Did you add localization for any text? If yes, did you sort the .arb file using ```arb_utils sort <INPUT_FILE>```? - [x] Check that any changes are related to the issue at hand. Co-authored-by: PartyDonut <PartyDonut@users.noreply.github.com>
This commit is contained in:
parent
2a2502147a
commit
d572884e61
12 changed files with 1696 additions and 393 deletions
|
|
@ -16,7 +16,7 @@ import 'package:fladder/providers/settings/home_settings_provider.dart';
|
|||
import 'package:fladder/providers/user_provider.dart';
|
||||
import 'package:fladder/providers/views_provider.dart';
|
||||
import 'package:fladder/routes/auto_router.gr.dart';
|
||||
import 'package:fladder/screens/shared/media/carousel_banner.dart';
|
||||
import 'package:fladder/screens/dashboard/top_posters_row.dart';
|
||||
import 'package:fladder/screens/shared/media/poster_row.dart';
|
||||
import 'package:fladder/screens/shared/nested_scaffold.dart';
|
||||
import 'package:fladder/screens/shared/nested_sliver_appbar.dart';
|
||||
|
|
@ -104,20 +104,7 @@ class _DashboardScreenState extends ConsumerState<DashboardScreen> {
|
|||
SliverToBoxAdapter(
|
||||
child: Transform.translate(
|
||||
offset: Offset(0, AdaptiveLayout.layoutOf(context) == LayoutState.phone ? -14 : 0),
|
||||
child: ConstrainedBox(
|
||||
constraints: BoxConstraints(
|
||||
minHeight: AdaptiveLayout.of(context).isDesktop ? 350 : 275,
|
||||
maxHeight: (MediaQuery.sizeOf(context).height * 0.25).clamp(400, double.infinity)),
|
||||
child: AspectRatio(
|
||||
aspectRatio: 1.6,
|
||||
child: SizedBox(
|
||||
width: MediaQuery.of(context).size.width,
|
||||
child: CarouselBanner(
|
||||
items: homeCarouselItems,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
child: TopPostersRow(posters: homeCarouselItems),
|
||||
),
|
||||
),
|
||||
} else if (AdaptiveLayout.of(context).isDesktop)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue