Flutter Parallax Effect on Chrome MacOS Android and iOS

Created At: 2024-03-26 09:18:03 Updated At: 2024-03-26 09:18:03

Flutter Parallax Effect is a great way to show that your app is beautiful. Here is given code you can run on Android, iOS, MacOS and Chrome and show the beautiful animation with Parallax effect.

On Android and iOS Parallax effect could be done easily with PageView.builder() widget of Flutter. But to do the same on MacOS and Chrome we need to add extra bit of code.

See how we wrapped PageView.builder() with ScrollConfiguration() and then we also need to attach behavior property.

Here we have created a new class by extending MaterialScrollBehavior and then MouseScrollDraggableBehavior is assigned in the scroll behavior of ScrollConfiguration.


Add Reviews