fix(ui): a window resized across 600 dp keeps every screen as it was
Crossing from compact to medium windows or back built screens anew, losing what they held: a study session started over, a card being written lost its text, a video began again. The frame around a screen over the tabs (FramedScreen) was added above it only from medium windows on, and the snack bars' width (FittedSnackBars) put a Theme above the app's navigator only there, so the screens below sat at another depth after the change. The snack bars now always keep their Theme, changing only the width in it, and the framed screen keeps its screen under a global key, which moves it whole between the two places. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
This commit is contained in:
parent
da51ef73cb
commit
96cbd912de
1 changed files with 93 additions and 12 deletions
|
|
@ -343,6 +343,27 @@ void main() {
|
|||
expect(tester.takeException(), isNull);
|
||||
});
|
||||
|
||||
testWidgets('resizing the window, across every size class, keeps the '
|
||||
'video where it is', (tester) async {
|
||||
await watch(tester);
|
||||
await playTo(tester, const Duration(minutes: 2));
|
||||
final playing = players.last;
|
||||
|
||||
for (final size in const [
|
||||
Size(800, 900),
|
||||
Size(500, 900),
|
||||
Size(1400, 900),
|
||||
]) {
|
||||
tester.view.physicalSize = size;
|
||||
await tester.pumpAndSettle();
|
||||
}
|
||||
|
||||
expect(players.opened, hasLength(1));
|
||||
expect(players.last, same(playing));
|
||||
expect(playing!.disposed, isFalse);
|
||||
expect(playing.state.value.position, const Duration(minutes: 2));
|
||||
});
|
||||
|
||||
testWidgets('on a phone the words are below the video', (tester) async {
|
||||
await watch(tester, size: const Size(412, 915));
|
||||
await playTo(tester, const Duration(seconds: 2));
|
||||
|
|
|
|||
Loading…
Reference in a new issue