fix(discover): 封面完整显示并移除图上标题
This commit is contained in:
1 parent
149b51b2c1
commit
4c2384fea9
2 files changed
+26
-29
No files matched your search
@@ -119,19 +119,12 @@ class _HomeDramaCard extends StatelessWidget {
|
|||||||
child: Stack(
|
child: Stack(
|
||||||
fit: StackFit.expand,
|
fit: StackFit.expand,
|
||||||
children: [
|
children: [
|
||||||
RemoteImage(
|
ColoredBox(
|
||||||
drama.posterUrl,
|
color: AppColors.card,
|
||||||
fit: BoxFit.cover,
|
child: RemoteImage(
|
||||||
showFallbackIcon: true,
|
drama.posterUrl,
|
||||||
),
|
fit: BoxFit.contain,
|
||||||
const DecoratedBox(
|
showFallbackIcon: true,
|
||||||
decoration: BoxDecoration(
|
|
||||||
gradient: LinearGradient(
|
|
||||||
begin: Alignment.topCenter,
|
|
||||||
end: Alignment.bottomCenter,
|
|
||||||
colors: [Color(0x0D000000), Color(0xCC000000)],
|
|
||||||
stops: [0.45, 1],
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
if (free)
|
if (free)
|
||||||
@@ -157,22 +150,6 @@ class _HomeDramaCard extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Positioned(
|
|
||||||
left: 6,
|
|
||||||
right: 6,
|
|
||||||
bottom: 6,
|
|
||||||
child: Text(
|
|
||||||
drama.title,
|
|
||||||
maxLines: 1,
|
|
||||||
overflow: TextOverflow.ellipsis,
|
|
||||||
style: const TextStyle(
|
|
||||||
color: AppColors.onPrimary,
|
|
||||||
fontSize: 9,
|
|
||||||
fontWeight: FontWeight.w800,
|
|
||||||
shadows: [Shadow(blurRadius: 6, color: Colors.black)],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -84,6 +84,26 @@ void main() {
|
|||||||
.height,
|
.height,
|
||||||
120,
|
120,
|
||||||
);
|
);
|
||||||
|
final cover = find.byKey(const Key('home-drama-cover-city-lights-demo'));
|
||||||
|
expect(
|
||||||
|
tester
|
||||||
|
.widget<RemoteImage>(
|
||||||
|
find.descendant(of: cover, matching: find.byType(RemoteImage)),
|
||||||
|
)
|
||||||
|
.fit,
|
||||||
|
BoxFit.contain,
|
||||||
|
);
|
||||||
|
expect(
|
||||||
|
find.descendant(
|
||||||
|
of: cover,
|
||||||
|
matching: find.text('City Lights & Velvet Nights'),
|
||||||
|
),
|
||||||
|
findsNothing,
|
||||||
|
);
|
||||||
|
expect(
|
||||||
|
find.byKey(const Key('home-drama-title-city-lights-demo')),
|
||||||
|
findsOneWidget,
|
||||||
|
);
|
||||||
expect(
|
expect(
|
||||||
tester
|
tester
|
||||||
.widget<Text>(
|
.widget<Text>(
|
||||||
|
|||||||
Reference in new issue
Block a user