Skip to content

Commit

Permalink
💄 cover填充
Browse files Browse the repository at this point in the history
  • Loading branch information
BTMuli committed Sep 7, 2024
1 parent a2e58c8 commit 22ab676
Showing 1 changed file with 23 additions and 23 deletions.
46 changes: 23 additions & 23 deletions lib/widgets/nap/nap_anno_card.dart
Original file line number Diff line number Diff line change
Expand Up @@ -40,36 +40,36 @@ class NapAnnoCardWidget extends StatelessWidget {
padding: WidgetStateProperty.all(EdgeInsets.zero),
),
onPressed: onPressed,
child: CachedNetworkImage(
imageUrl: anno.banner,
progressIndicatorBuilder: (context, url, progress) => Center(
child: ProgressRing(value: progress.progress),
),
fit: BoxFit.cover,
errorWidget: (context, url, error) => const Center(
child: Icon(FluentIcons.error),
child: AspectRatio(
aspectRatio: 36 / 13,
child: CachedNetworkImage(
imageUrl: anno.banner,
progressIndicatorBuilder: (context, url, progress) => Center(
child: ProgressRing(value: progress.progress),
),
fit: BoxFit.contain,
errorWidget: (context, url, error) => const Center(
child: Icon(FluentIcons.error),
),
),
),
),
Tooltip(
message: getTitle(anno.title),
child: Padding(
padding: const EdgeInsets.symmetric(vertical: 4, horizontal: 8),
child: Row(
children: [
Expanded(
child: Text(
anno.subtitle,
style: TextStyle(
fontSize: 20.sp,
fontWeight: FontWeight.bold,
),
overflow: TextOverflow.ellipsis,
maxLines: 1,
child: Row(
children: [
Expanded(
child: Text(
anno.subtitle,
style: TextStyle(
fontSize: 16.spMin,
fontWeight: FontWeight.bold,
),
overflow: TextOverflow.ellipsis,
maxLines: 1,
),
],
),
),
],
),
),
],
Expand Down

0 comments on commit 22ab676

Please sign in to comment.