-
Notifications
You must be signed in to change notification settings - Fork 30.2k
Description
Issue Summary
If you use the Scaffold property extendBodyBehindAppBar and use any of the Floating action button locations:
FloatingActionButtonLocation.startTop
FloatingActionButtonLocation.centerTop
FloatingActionButtonLocation.endTop
The FAB location is wrong based on how the location is specified in the documentation. All the top locations are described as "floating over the transition between the Scaffold.appBar and the Scaffold.body."
https://api.flutter.dev/flutter/material/FloatingActionButtonLocation-class.html
If you use extendBodyBehindAppBar the FAB moves up and becomes centered vertically in the app bar.
Steps to Reproduce
The issue applies to all Flutter channels and any target type and can easily be demonstrated with a DartPad example:
https://dartpad.dartlang.org/4fb5f2d1316115913fc41a26463486e6
Source: https://gist.github.com/rydmike/4fb5f2d1316115913fc41a26463486e6
Expected results
When extendBodyBehindAppBar is false the top FAB locations are correct:
Actual results
When extendBodyBehindAppBar is true the top FAB locations are incorrect:
Additional info
With the issue demo application we can turn of the properties extendBodyBehindAppBar and extendBody and try different FloatingActionButtonLocation. The example app also uses semi-transparent app- and bottom navigation bars so we can verify and see content scrolling behind them when the properties are enabled.
With the issue demo application we can also test and verify that this faulty location behavior is not replicated on bottom locations when using any of the FAB bottom locations combined with the Scaffold extendBody property, nor does the presence of the app bar or bottom navigation bar affect the results.

