merge: 合并 K86.7 键盘弹出不压缩视频页
This commit is contained in:
commit
de99c09454
4 files changed
+44
No files matched your search
@@ -247,6 +247,7 @@ class _HomeTabsState extends State<_HomeTabs> {
|
|||||||
child: Scaffold(
|
child: Scaffold(
|
||||||
key: logic.scaffoldKey,
|
key: logic.scaffoldKey,
|
||||||
backgroundColor: Colors.transparent,
|
backgroundColor: Colors.transparent,
|
||||||
|
resizeToAvoidBottomInset: false,
|
||||||
body: _body(context),
|
body: _body(context),
|
||||||
bottomNavigationBar: logic.videoImmersive ? null : _nav(context, l10n),
|
bottomNavigationBar: logic.videoImmersive ? null : _nav(context, l10n),
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -291,6 +291,7 @@ class _PlayerPageState extends State<PlayerPage>
|
|||||||
: Scaffold(
|
: Scaffold(
|
||||||
key: const Key('player-scaffold'),
|
key: const Key('player-scaffold'),
|
||||||
backgroundColor: Colors.transparent,
|
backgroundColor: Colors.transparent,
|
||||||
|
resizeToAvoidBottomInset: false,
|
||||||
body: body,
|
body: body,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -86,6 +86,26 @@ void main() {
|
|||||||
expect(tester.widget<PlayerPage>(find.byType(PlayerPage)).homeMode, isTrue);
|
expect(tester.widget<PlayerPage>(find.byType(PlayerPage)).homeMode, isTrue);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
testWidgets('should_keep_home_feed_size_when_keyboard_insets_change', (
|
||||||
|
tester,
|
||||||
|
) async {
|
||||||
|
addTearDown(tester.view.resetViewInsets);
|
||||||
|
await _pumpApp(tester);
|
||||||
|
final feed = find.byKey(const Key('home-feed-black-background'));
|
||||||
|
final before = tester.getRect(feed);
|
||||||
|
|
||||||
|
tester.view.viewInsets = const FakeViewPadding(bottom: 300);
|
||||||
|
await tester.pump();
|
||||||
|
|
||||||
|
expect(
|
||||||
|
tester
|
||||||
|
.widget<Scaffold>(find.byType(Scaffold).first)
|
||||||
|
.resizeToAvoidBottomInset,
|
||||||
|
isFalse,
|
||||||
|
);
|
||||||
|
expect(tester.getRect(feed), before);
|
||||||
|
});
|
||||||
|
|
||||||
testWidgets('should_open_full_player_from_full_series_bar', (tester) async {
|
testWidgets('should_open_full_player_from_full_series_bar', (tester) async {
|
||||||
await _pumpApp(tester);
|
await _pumpApp(tester);
|
||||||
|
|
||||||
|
|||||||
@@ -555,6 +555,28 @@ void main() {
|
|||||||
expect(tester.takeException(), isNull);
|
expect(tester.takeException(), isNull);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
testWidgets(
|
||||||
|
'should_keep_fullscreen_player_position_when_keyboard_insets_change',
|
||||||
|
(tester) async {
|
||||||
|
addTearDown(tester.view.resetViewInsets);
|
||||||
|
await _pumpApp(tester);
|
||||||
|
await _openSeriesPlayer(tester);
|
||||||
|
final rail = find.byKey(const Key('player-interaction-rail'));
|
||||||
|
final before = tester.getRect(rail);
|
||||||
|
|
||||||
|
tester.view.viewInsets = const FakeViewPadding(bottom: 300);
|
||||||
|
await tester.pump();
|
||||||
|
|
||||||
|
expect(
|
||||||
|
tester
|
||||||
|
.widget<Scaffold>(find.byKey(const Key('player-scaffold')))
|
||||||
|
.resizeToAvoidBottomInset,
|
||||||
|
isFalse,
|
||||||
|
);
|
||||||
|
expect(tester.getRect(rail), before);
|
||||||
|
},
|
||||||
|
);
|
||||||
|
|
||||||
testWidgets('should_keep_series_clear_state_when_swiping_next_episode', (
|
testWidgets('should_keep_series_clear_state_when_swiping_next_episode', (
|
||||||
tester,
|
tester,
|
||||||
) async {
|
) async {
|
||||||
|
|||||||
Reference in new issue
Block a user