fix(flutter): 修复详情与播放器底部闪白
This commit is contained in:
1 parent
9eec9ed77a
commit
0aa5a99a22
8 files changed
+201
-92
No files matched your search
@@ -1,6 +1,7 @@
|
||||
// Author: fruit.com.cn
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'package:shared_preferences/shared_preferences.dart';
|
||||
@@ -53,6 +54,11 @@ void main() {
|
||||
) async {
|
||||
await _pumpDetail(tester);
|
||||
|
||||
final overlay = tester.widget<AnnotatedRegion<SystemUiOverlayStyle>>(
|
||||
find.byKey(const Key('detail-system-overlay')),
|
||||
);
|
||||
expect(overlay.value.systemNavigationBarColor, AppColors.ink);
|
||||
expect(overlay.value.systemNavigationBarContrastEnforced, isFalse);
|
||||
expect(find.byKey(const Key('detail-hero')), findsOneWidget);
|
||||
expect(
|
||||
tester.getSize(find.byKey(const Key('detail-poster'))),
|
||||
@@ -92,6 +98,10 @@ void main() {
|
||||
expect(find.byKey(const Key('detail-tags')), findsOneWidget);
|
||||
expect(find.byKey(const Key('detail-episodes-section')), findsOneWidget);
|
||||
expect(tester.getSize(find.byKey(const Key('detail-cta'))).height, 46);
|
||||
final bottomBar = tester.widget<Container>(
|
||||
find.byKey(const Key('detail-bottom-bar')),
|
||||
);
|
||||
expect((bottomBar.decoration! as BoxDecoration).color, AppColors.ink);
|
||||
expect(find.byKey(const Key('detail-share')), findsOneWidget);
|
||||
expect(find.byKey(const Key('detail-more')), findsOneWidget);
|
||||
for (final key in const [Key('detail-share'), Key('detail-more')]) {
|
||||
|
||||
Reference in new issue
Block a user