Open kerberjg opened 5 years ago
Why not automatic change the large property
final _NavigationBarStaticComponents components = _NavigationBarStaticComponents(
keys: keys,
// ...
padding: widget.padding,
large: MediaQuery.of(context).orientation != Orientation.landscape,
);
Hi @kerberjg Are you suggesting a large title should automatically shrink to normal rise when rotating the device.
@TahaTesser Yes, and it should stay that way as long as it's in landscape, as per native iOS behavior
I can still reproduce the issue, The title is still of the same size in both landscape and portrait mode.
While it is okay for CupertinoSliverNavigationBar to be "large" in portrait mode (and becoming small as the user scrolls down), it should always stay small in landscape mode.
This could be easily solvable if a parameter controlling the size was present in the constructor (so it could be wrapped in a OrientationBuilder), but this is not the case.
This is how it should look like:
This is what it actually looks like:
I would like to propose a fix:
Expose the
large
property of_NavigationBarStaticComponents
and have the_CupertinoSliverNavigationBarState
use a OrientationBuilder to manipulate this property as needed.