Merge branch 'main' into design

This commit is contained in:
guozhigq
2024-05-05 17:07:00 +08:00
7 changed files with 32 additions and 17 deletions

14
change_log/1.0.23.0504.md Normal file
View File

@ -0,0 +1,14 @@
## 1.0.23
### 功能
+ 封面下载
### 修复
+ 全屏问题
+ 视频播放器灰屏问题
+ 评论区点击区域问题
更多更新日志可在Github上查看
问题反馈、功能建议请查看「关于」页面。

View File

@ -34,6 +34,9 @@ class NetworkImgLayer extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
final int defaultImgQuality = GlobalData().imgQuality; final int defaultImgQuality = GlobalData().imgQuality;
if (src == '' || src == null) {
return placeholder(context);
}
final String imageUrl = final String imageUrl =
'${src!.startsWith('//') ? 'https:${src!}' : src!}@${quality ?? defaultImgQuality}q.webp'; '${src!.startsWith('//') ? 'https:${src!}' : src!}@${quality ?? defaultImgQuality}q.webp';
int? memCacheWidth, memCacheHeight; int? memCacheWidth, memCacheHeight;

View File

@ -196,7 +196,7 @@ class _DynamicDetailPageState extends State<DynamicDetailPage>
centerTitle: false, centerTitle: false,
titleSpacing: 0, titleSpacing: 0,
title: StreamBuilder( title: StreamBuilder(
stream: titleStreamC.stream.distinct(), stream: titleStreamC.stream,
initialData: false, initialData: false,
builder: (context, AsyncSnapshot snapshot) { builder: (context, AsyncSnapshot snapshot) {
return AnimatedOpacity( return AnimatedOpacity(

View File

@ -1,14 +1,13 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:get/get.dart'; import 'package:get/get.dart';
import 'package:pilipala/pages/dynamics/index.dart'; import 'package:pilipala/pages/dynamics/index.dart';
import '../../../models/dynamics/result.dart';
import 'action_panel.dart'; import 'action_panel.dart';
import 'author_panel.dart'; import 'author_panel.dart';
import 'content_panel.dart'; import 'content_panel.dart';
import 'forward_panel.dart'; import 'forward_panel.dart';
class DynamicPanel extends StatelessWidget { class DynamicPanel extends StatelessWidget {
final DynamicItemModel item; final dynamic item;
final String? source; final String? source;
DynamicPanel({required this.item, this.source, Key? key}) : super(key: key); DynamicPanel({required this.item, this.source, Key? key}) : super(key: key);
final DynamicsController _dynamicsController = Get.put(DynamicsController()); final DynamicsController _dynamicsController = Get.put(DynamicsController());

View File

@ -80,15 +80,12 @@ Widget videoSeasonWidget(item, context, type, {floor = 1}) {
double width = box.maxWidth; double width = box.maxWidth;
return Stack( return Stack(
children: [ children: [
Hero( NetworkImgLayer(
tag: content.bvid,
child: NetworkImgLayer(
type: floor == 1 ? 'emote' : null, type: floor == 1 ? 'emote' : null,
width: width, width: width,
height: width / StyleString.aspectRatio, height: width / StyleString.aspectRatio,
src: content.cover, src: content.cover,
), ),
),
if (content.badge != null && type == 'pgc') if (content.badge != null && type == 'pgc')
PBadge( PBadge(
text: content.badge['text'], text: content.badge['text'],

View File

@ -323,11 +323,13 @@ class _VideoDetailPageState extends State<VideoDetailPage>
children: [ children: [
GestureDetector( GestureDetector(
onTap: handlePlay, onTap: handlePlay,
child: Image.network( child: Obx(
vdCtr.videoItem['pic'], () => NetworkImgLayer(
src: vdCtr.cover.value,
width: Get.width, width: Get.width,
height: videoHeight, height: videoHeight,
fit: BoxFit.cover, // 适应方式根据需要调整 type: 'emote',
),
), ),
), ),
buildCustomAppBar(), buildCustomAppBar(),

View File

@ -16,7 +16,7 @@ publish_to: "none" # Remove this line if you wish to publish to pub.dev
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
# In Windows, build-name is used as the major, minor, and patch parts # In Windows, build-name is used as the major, minor, and patch parts
# of the product and file versions while build-number is used as the build suffix. # of the product and file versions while build-number is used as the build suffix.
version: 1.0.22+1022 version: 1.0.23+1023
environment: environment:
sdk: ">=3.0.0 <4.0.0" sdk: ">=3.0.0 <4.0.0"