Skip to content

Commit

Permalink
feat: enable item snapping in carousel views on home page
Browse files Browse the repository at this point in the history
  • Loading branch information
gokadzev committed Dec 25, 2024
1 parent 3411fae commit 0f73501
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/screens/home_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ class _HomePageState extends State<HomePage> {
constraints: BoxConstraints(maxHeight: playlistHeight),
child: CarouselView.weighted(
flexWeights: const <int>[3, 2, 1],
itemSnapping: true,
onTap: (index) => Navigator.push(
context,
MaterialPageRoute(
Expand Down Expand Up @@ -204,6 +205,7 @@ class _HomePageState extends State<HomePage> {
constraints: BoxConstraints(maxHeight: contentHeight),
child: CarouselView.weighted(
flexWeights: const <int>[3, 2, 1],
itemSnapping: true,
onTap: (index) => Navigator.push(
context,
MaterialPageRoute(
Expand Down

0 comments on commit 0f73501

Please sign in to comment.