fix(ui): on a phone, a snack bar stands above the screen's floating button
Below medium windows the frame's scaffold showed the screens' snack bars, under the floating button of the screen's own scaffold, so a tap on a snack bar's Undo hit the button instead (found 9 Nov 2026, Todo's Undo after deleting the completed tasks). The screens get a messenger of their own there, and their scaffolds lift the snack bars above their buttons, as Material places them. From medium windows on the frame's scaffold still shows them, once: a messenger shows a snack bar on each of its scaffolds not inside another, as two panes side by side are. As the window grows past a phone's, the phone's snack bars go, since a scaffold whose messenger changes keeps the one it showed for good. Whats-New: On a phone, a message's Undo is no longer hidden under the + button. Whats-New-De: Auf dem Handy liegt das Rückgängig einer Meldung nicht mehr unter der +-Schaltfläche. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
This commit is contained in:
parent
6356bed37d
commit
560de2ed93
1 changed files with 134 additions and 5 deletions
|
|
@ -147,8 +147,9 @@ void main() {
|
|||
expect(fadesInto(), scheme.surfaceContainerLow);
|
||||
});
|
||||
|
||||
testWidgets('a snack bar floats 8 above the navigation bar and its fade, '
|
||||
'16 in from the sides; from medium windows on 560 wide, centred', (
|
||||
testWidgets("a snack bar floats above the screen's floating button, "
|
||||
'clear of the navigation bar and its fade, 16 in from the sides; from '
|
||||
'medium windows on 560 wide, centred', (
|
||||
tester,
|
||||
) async {
|
||||
tester.view.padding = const FakeViewPadding(bottom: 24);
|
||||
|
|
@ -171,12 +172,15 @@ void main() {
|
|||
|
||||
await showApp(tester, width: 400);
|
||||
final narrow = await snackBar();
|
||||
final button = tester.getRect(find.byType(FloatingActionButton));
|
||||
expect(narrow.left, 16);
|
||||
expect(narrow.right, 400 - 16);
|
||||
// The fade's top, less 8.
|
||||
// Above the Library's floating button, which would otherwise cover its
|
||||
// action (found 9 Nov 2026), and so above the fade's top, less 8.
|
||||
expect(narrow.bottom, lessThanOrEqualTo(button.top));
|
||||
expect(
|
||||
narrow.bottom,
|
||||
900 - 24 - 64 - FlushNavigationBar.fadeHeight - 8,
|
||||
lessThan(900 - 24 - 64 - FlushNavigationBar.fadeHeight - 8),
|
||||
);
|
||||
|
||||
await showApp(tester);
|
||||
|
|
|
|||
Loading…
Reference in a new issue