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