Skip to content

Commit

Permalink
fix: 专栏封面图尺寸异常
Browse files Browse the repository at this point in the history
  • Loading branch information
guozhigq committed Jan 31, 2024
1 parent 8a2c023 commit ea8af28
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions lib/pages/search_panel/widgets/article_panel.dart
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,17 @@ Widget searchArticlePanel(BuildContext context, ctr, list) {
padding: const EdgeInsets.fromLTRB(
StyleString.safeSpace, 5, StyleString.safeSpace, 5),
child: LayoutBuilder(builder: (context, boxConstraints) {
double width = (boxConstraints.maxWidth -
StyleString.cardSpace *
6 /
MediaQuery.textScalerOf(context).scale(2.0));
final double width = (boxConstraints.maxWidth -
StyleString.cardSpace *
6 /
MediaQuery.textScalerOf(context).scale(1.0)) /
2;
return Container(
constraints: const BoxConstraints(minHeight: 88),
height: width / StyleString.aspectRatio,
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
children: <Widget>[
if (list[index].imageUrls != null &&
list[index].imageUrls.isNotEmpty)
AspectRatio(
Expand Down

0 comments on commit ea8af28

Please sign in to comment.