feat: save all pics

This commit is contained in:
bggRGjQaUbCoE
2024-10-13 09:37:59 +08:00
parent ae0d012c0f
commit 2f456da1c5
3 changed files with 69 additions and 33 deletions

View File

@@ -1,6 +1,7 @@
import 'dart:math';
import 'package:PiliPalaX/grpc/app/card/v1/card.pb.dart' as card;
import 'package:PiliPalaX/utils/extension.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import '../../utils/download.dart';
@@ -80,11 +81,17 @@ class OverlayPop extends StatelessWidget {
onPressed: () async {
await DownloadUtils.downloadImg(
context,
videoItem is card.Card
? (videoItem as card.Card).smallCoverV5.base.cover
: (videoItem.pic != null
? videoItem.pic as String
: videoItem.cover as String),
[
videoItem is card.Card
? (videoItem as card.Card)
.smallCoverV5
.base
.cover
.http2https
: (videoItem.pic != null
? (videoItem.pic as String).http2https
: (videoItem.cover as String).http2https)
],
);
closeFn!();
},