forked from firka/flutter
Add CupertinoSliverNavigationBar large title magnification on over scroll (#110127)
* Add magnification of CupertinoSliverNavigationBar large title * Fix padding in maximum scale computation * Apply magnification by using RenderBox * Do not pass key to the superclass constructor * Use `clampDouble` instead of `clamp` extension method * Remove trailing whitespaces to make linter happy * Name test variables more precisely * Move transform computation to `performLayout` and implement `hitTestChildren` * Address comments * Address comments * Address comments * Update comment about scale * Fix hit-testing * Fix hit-testing again * Make linter happy * Implement magnifying without using LayoutBuilder * Remove trailing spaces * Add hit-testing of the large title * Remove whitespaces * Fix scale computation and some tests * Fix remaining tests * Refactor and fix comments * Update comments
This commit is contained in:
@@ -20,7 +20,7 @@ void main() {
|
||||
await tester.pumpAndSettle();
|
||||
|
||||
// Large title is hidden and at higher position.
|
||||
expect(tester.getBottomLeft(find.text('Contacts').first).dy, 36.0);
|
||||
expect(tester.getBottomLeft(find.text('Contacts').first).dy, 36.0 + 8.0); // Static part + _kNavBarBottomPadding.
|
||||
});
|
||||
|
||||
testWidgets('Middle widget is visible in both collapsed and expanded states', (WidgetTester tester) async {
|
||||
@@ -43,7 +43,7 @@ void main() {
|
||||
|
||||
// Large title is hidden and middle title is visible.
|
||||
expect(tester.getBottomLeft(find.text('Contacts Group').first).dy, 30.5);
|
||||
expect(tester.getBottomLeft(find.text('Family').first).dy, 36.0);
|
||||
expect(tester.getBottomLeft(find.text('Family').first).dy, 36.0 + 8.0); // Static part + _kNavBarBottomPadding.
|
||||
});
|
||||
|
||||
testWidgets('CupertinoSliverNavigationBar with previous route has back button', (WidgetTester tester) async {
|
||||
|
||||
Reference in New Issue
Block a user