mod: 直播功能注释
This commit is contained in:
@ -27,7 +27,7 @@ InlineSpan richNode(item, context) {
|
||||
} else {
|
||||
for (var i in richTextNodes) {
|
||||
/// fix 渲染专栏时内容会重复
|
||||
if (item.modules.moduleDynamic.major?.opus?.title == null &&
|
||||
if (item.modules.moduleDynamic.major.opus.title == null &&
|
||||
i.type == 'RICH_TEXT_NODE_TYPE_TEXT') {
|
||||
spanChilds.add(
|
||||
TextSpan(text: i.origText, style: const TextStyle(height: 1.65)));
|
||||
@ -193,17 +193,16 @@ InlineSpan richNode(item, context) {
|
||||
);
|
||||
}
|
||||
}
|
||||
try {
|
||||
if (contentType == 'major' &&
|
||||
item.modules.moduleDynamic.major.opus.pics.isNotEmpty) {
|
||||
// 图片可能跟其他widget重复渲染
|
||||
List<OpusPicsModel> pics = item.modules.moduleDynamic.major.opus.pics;
|
||||
int len = pics.length;
|
||||
List picList = [];
|
||||
List<String> picList = [];
|
||||
|
||||
if (len == 1) {
|
||||
OpusPicsModel pictureItem = pics.first;
|
||||
picList.add(pictureItem.url);
|
||||
picList.add(pictureItem.url!);
|
||||
spanChilds.add(const TextSpan(text: '\n'));
|
||||
spanChilds.add(
|
||||
WidgetSpan(
|
||||
@ -211,8 +210,13 @@ InlineSpan richNode(item, context) {
|
||||
builder: (context, BoxConstraints box) {
|
||||
return GestureDetector(
|
||||
onTap: () {
|
||||
Get.toNamed('/preview',
|
||||
arguments: {'initialPage': 0, 'imgList': picList});
|
||||
showDialog(
|
||||
useSafeArea: false,
|
||||
context: context,
|
||||
builder: (context) {
|
||||
return ImagePreview(initialPage: 0, imgList: picList);
|
||||
},
|
||||
);
|
||||
},
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.only(top: 4),
|
||||
@ -234,14 +238,19 @@ InlineSpan richNode(item, context) {
|
||||
if (len > 1) {
|
||||
List<Widget> list = [];
|
||||
for (var i = 0; i < len; i++) {
|
||||
picList.add(pics[i].url);
|
||||
picList.add(pics[i].url!);
|
||||
list.add(
|
||||
LayoutBuilder(
|
||||
builder: (context, BoxConstraints box) {
|
||||
return GestureDetector(
|
||||
onTap: () {
|
||||
Get.toNamed('/preview',
|
||||
arguments: {'initialPage': i, 'imgList': picList});
|
||||
showDialog(
|
||||
useSafeArea: false,
|
||||
context: context,
|
||||
builder: (context) {
|
||||
return ImagePreview(initialPage: i, imgList: picList);
|
||||
},
|
||||
);
|
||||
},
|
||||
child: NetworkImgLayer(
|
||||
src: pics[i].url,
|
||||
@ -294,15 +303,12 @@ InlineSpan richNode(item, context) {
|
||||
// ),
|
||||
// );
|
||||
}
|
||||
} catch (err) {
|
||||
print('❌rich_node_panel err: $err');
|
||||
}
|
||||
return TextSpan(
|
||||
children: spanChilds,
|
||||
);
|
||||
}
|
||||
} catch (err) {
|
||||
print('❌❌rich_node_panel err: $err');
|
||||
print('❌rich_node_panel err: $err');
|
||||
return spacer;
|
||||
}
|
||||
}
|
||||
|
||||
@ -58,39 +58,37 @@ class _BottomControlState extends State<BottomControl> {
|
||||
titleSpacing: 14,
|
||||
title: Row(
|
||||
children: [
|
||||
ComBtn(
|
||||
icon: const Icon(
|
||||
Icons.subtitles_outlined,
|
||||
size: 18,
|
||||
color: Colors.white,
|
||||
),
|
||||
fuc: () => Get.back(),
|
||||
),
|
||||
const SizedBox(width: 4),
|
||||
// ComBtn(
|
||||
// icon: const Icon(
|
||||
// Icons.subtitles_outlined,
|
||||
// size: 18,
|
||||
// color: Colors.white,
|
||||
// ),
|
||||
// fuc: () => Get.back(),
|
||||
// ),
|
||||
const Spacer(),
|
||||
const SizedBox(width: 4),
|
||||
ComBtn(
|
||||
icon: const Icon(
|
||||
Icons.hd_outlined,
|
||||
size: 18,
|
||||
color: Colors.white,
|
||||
),
|
||||
fuc: () => {},
|
||||
),
|
||||
const SizedBox(width: 4),
|
||||
Obx(
|
||||
() => ComBtn(
|
||||
icon: Icon(
|
||||
widget.liveRoomCtr!.volumeOff.value
|
||||
? Icons.volume_off_outlined
|
||||
: Icons.volume_up_outlined,
|
||||
size: 18,
|
||||
color: Colors.white,
|
||||
),
|
||||
fuc: () => {},
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 4),
|
||||
// ComBtn(
|
||||
// icon: const Icon(
|
||||
// Icons.hd_outlined,
|
||||
// size: 18,
|
||||
// color: Colors.white,
|
||||
// ),
|
||||
// fuc: () => {},
|
||||
// ),
|
||||
// const SizedBox(width: 4),
|
||||
// Obx(
|
||||
// () => ComBtn(
|
||||
// icon: Icon(
|
||||
// widget.liveRoomCtr!.volumeOff.value
|
||||
// ? Icons.volume_off_outlined
|
||||
// : Icons.volume_up_outlined,
|
||||
// size: 18,
|
||||
// color: Colors.white,
|
||||
// ),
|
||||
// fuc: () => {},
|
||||
// ),
|
||||
// ),
|
||||
// const SizedBox(width: 4),
|
||||
if (Platform.isAndroid) ...[
|
||||
SizedBox(
|
||||
width: 34,
|
||||
|
||||
Reference in New Issue
Block a user