Skip to content

Commit

Permalink
fix: 推荐卡片单列布局
Browse files Browse the repository at this point in the history
  • Loading branch information
guozhigq committed Mar 2, 2024
1 parent ae33cbf commit 4191caf
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/common/widgets/video_card_v.dart
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,7 @@ class VideoContent extends StatelessWidget {
const SizedBox(height: 2),
VideoStat(
videoItem: videoItem,
crossAxisCount: crossAxisCount,
),
],
if (crossAxisCount == 1) const SizedBox(height: 4),
Expand Down Expand Up @@ -294,6 +295,7 @@ class VideoContent extends StatelessWidget {
),
VideoStat(
videoItem: videoItem,
crossAxisCount: crossAxisCount,
),
const Spacer(),
],
Expand All @@ -317,10 +319,12 @@ class VideoContent extends StatelessWidget {

class VideoStat extends StatelessWidget {
final dynamic videoItem;
final int crossAxisCount;

const VideoStat({
Key? key,
required this.videoItem,
required this.crossAxisCount,
}) : super(key: key);

@override
Expand All @@ -337,7 +341,7 @@ class VideoStat extends StatelessWidget {
danmu: videoItem.stat.danmu,
),
if (videoItem is RecVideoItemModel) ...<Widget>[
const Spacer(),
crossAxisCount > 1 ? const Spacer() : const SizedBox(width: 8),
RichText(
maxLines: 1,
text: TextSpan(
Expand Down

0 comments on commit 4191caf

Please sign in to comment.