Axel
Axel

Reputation: 695

Flutter FlexibleSpacebar not stretching on Android

I copied the sample code in the Flutter page on using FlexibleSpaceBar class to check it out on iOS and Android. It is working as expected in iOS but not stretching in Android. Is there a compatibility issue on the the version of Android it would work or are there additional steps needed to do?

Upvotes: 0

Views: 578

Answers (1)

Miguel Ruivo
Miguel Ruivo

Reputation: 17736

Yes, by default Android use ClampingScrollPhysics whereas iOS uses BouncingScrollPhysics.

You can force it to behave equally on both by setting the physics property to BouncingScrollPhysics of your CustomScrollView or other Sliver view that you're using with it.

add physics: BouncingScrollPhysics() in NestedScrollView

Upvotes: 3

Related Questions