diegoveloper / flutter-samples

Flutter Samples
MIT License
3.11k stars 745 forks source link

Content overlays on TabBar in CollapsingToolbar #3

Closed niegus closed 5 years ago

niegus commented 5 years ago

I've used your CollapsingToolbar as a example for my app but when a scroll is done, the content of the body overlays the TabBar.

Any idea on this?

diegoveloper commented 5 years ago

Could you add a minimum sample code to reproduce the issue?

On Sun, Feb 10, 2019, 4:20 PM Diego Vélez Gil <notifications@github.com wrote:

I've used your CollapsingToolbar as a example for my app but when a scroll is done, the content of the body overlays the TabBar.

Any idea on this?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/diegoveloper/flutter-samples/issues/3, or mute the thread https://github.com/notifications/unsubscribe-auth/AEq90GfzW1zPaWEIGkIujrVuYFdoYedLks5vMI0jgaJpZM4azR_j .

niegus commented 5 years ago

Yes, basically your "main_collapsing_toolbar.dart" but remove the Center from the body:

body: Text("Sample text"),

diegoveloper commented 5 years ago

Hmm, inside the build method for _SliverAppBarDelegate set a color for your Container and let me know if it works for you.

On Sun, Feb 10, 2019 at 6:15 PM Diego Vélez Gil notifications@github.com wrote:

Yes, basically your "main_collapsing_toolbar.dart" but remove the Center from the body:

body: Text("Sample text"),

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/diegoveloper/flutter-samples/issues/3#issuecomment-462190695, or mute the thread https://github.com/notifications/unsubscribe-auth/AEq90ERTyvkFNrSb13R_2dRRn2uOebo8ks5vMKgXgaJpZM4azR_j .

niegus commented 5 years ago

I've tried that, but the behaviour is the same.

@override Widget build( BuildContext context, double shrinkOffset, bool overlapsContent) { return new Container( child: _tabBar, color: Colors.amber.shade400, ); }

diegoveloper commented 5 years ago

Could you add a screenshot please?

On Mon, Feb 11, 2019 at 1:31 AM Diego Vélez Gil notifications@github.com wrote:

I've tried that, but the behaviour is the same.

@override https://github.com/override Widget build( BuildContext context, double shrinkOffset, bool overlapsContent) { return new Container( child: _tabBar, color: Colors.amber.shade400, ); }

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/diegoveloper/flutter-samples/issues/3#issuecomment-462229706, or mute the thread https://github.com/notifications/unsubscribe-auth/AEq90B6x28eiO8tBEjZTxBdUTxM25MDwks5vMQ5HgaJpZM4azR_j .

niegus commented 5 years ago

This is the behaviour. https://im2.ezgif.com/tmp/ezgif-2-3f2a70520a8a.gif

When I set the color. https://im2.ezgif.com/tmp/ezgif-2-8ccdb1310313.gif

diegoveloper commented 5 years ago

ok, it looks like there is an issue and a solution also, check this : https://github.com/zmtzawqlp/Flutter_Candies/tree/master/extended_nested_scroll_view