opt: dynamics pic radius
This commit is contained in:
@ -66,76 +66,85 @@ Widget liveRcmdPanel(item, context, {floor = 1}) {
|
|||||||
},
|
},
|
||||||
child: LayoutBuilder(builder: (context, box) {
|
child: LayoutBuilder(builder: (context, box) {
|
||||||
double width = box.maxWidth;
|
double width = box.maxWidth;
|
||||||
return Stack(
|
return Container(
|
||||||
children: [
|
margin: floor == 1
|
||||||
Hero(
|
? const EdgeInsets.only(
|
||||||
tag: liveRcmd.roomId.toString(),
|
left: StyleString.safeSpace, right: StyleString.safeSpace)
|
||||||
child: NetworkImgLayer(
|
: EdgeInsets.zero,
|
||||||
type: floor == 1 ? 'emote' : null,
|
clipBehavior: Clip.hardEdge,
|
||||||
width: width,
|
decoration: const BoxDecoration(
|
||||||
height: width / StyleString.aspectRatio,
|
borderRadius: BorderRadius.all(StyleString.imgRadius)),
|
||||||
src: item.modules.moduleDynamic.major.liveRcmd.cover,
|
child: Stack(
|
||||||
),
|
children: [
|
||||||
),
|
Hero(
|
||||||
PBadge(
|
tag: liveRcmd.roomId.toString(),
|
||||||
text: watchedShow['text_large'],
|
child: NetworkImgLayer(
|
||||||
top: 6,
|
type: floor == 1 ? 'emote' : null,
|
||||||
right: 56,
|
width: width,
|
||||||
bottom: null,
|
height: width / StyleString.aspectRatio,
|
||||||
left: null,
|
src: item.modules.moduleDynamic.major.liveRcmd.cover,
|
||||||
type: 'gray',
|
|
||||||
),
|
|
||||||
PBadge(
|
|
||||||
text: liveStatus == 1 ? '直播中' : '直播结束',
|
|
||||||
top: 6,
|
|
||||||
right: 6,
|
|
||||||
bottom: null,
|
|
||||||
left: null,
|
|
||||||
),
|
|
||||||
Positioned(
|
|
||||||
left: 0,
|
|
||||||
right: 0,
|
|
||||||
bottom: 0,
|
|
||||||
child: Container(
|
|
||||||
height: 80,
|
|
||||||
padding: const EdgeInsets.fromLTRB(12, 0, 10, 10),
|
|
||||||
clipBehavior: Clip.hardEdge,
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
gradient: const LinearGradient(
|
|
||||||
begin: Alignment.topCenter,
|
|
||||||
end: Alignment.bottomCenter,
|
|
||||||
colors: <Color>[
|
|
||||||
Colors.transparent,
|
|
||||||
Colors.black45,
|
|
||||||
],
|
|
||||||
),
|
|
||||||
borderRadius: floor == 1
|
|
||||||
? null
|
|
||||||
: const BorderRadius.all(Radius.circular(6))),
|
|
||||||
child: Row(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.end,
|
|
||||||
children: [
|
|
||||||
DefaultTextStyle.merge(
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: Theme.of(context)
|
|
||||||
.textTheme
|
|
||||||
.labelMedium!
|
|
||||||
.fontSize,
|
|
||||||
color: Colors.white),
|
|
||||||
child: Row(
|
|
||||||
children: [
|
|
||||||
Text(item.modules.moduleDynamic.major.liveRcmd
|
|
||||||
.areaName ??
|
|
||||||
''),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
PBadge(
|
||||||
],
|
text: watchedShow['text_large'],
|
||||||
|
top: 8.0,
|
||||||
|
right: 62.0,
|
||||||
|
bottom: null,
|
||||||
|
left: null,
|
||||||
|
type: 'gray',
|
||||||
|
),
|
||||||
|
PBadge(
|
||||||
|
text: liveStatus == 1 ? '直播中' : '直播结束',
|
||||||
|
top: 8.0,
|
||||||
|
right: 10.0,
|
||||||
|
bottom: null,
|
||||||
|
left: null,
|
||||||
|
),
|
||||||
|
Positioned(
|
||||||
|
left: 0,
|
||||||
|
right: 0,
|
||||||
|
bottom: 0,
|
||||||
|
child: Container(
|
||||||
|
height: 80,
|
||||||
|
padding: const EdgeInsets.fromLTRB(12, 0, 10, 10),
|
||||||
|
clipBehavior: Clip.hardEdge,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
gradient: const LinearGradient(
|
||||||
|
begin: Alignment.topCenter,
|
||||||
|
end: Alignment.bottomCenter,
|
||||||
|
colors: <Color>[
|
||||||
|
Colors.transparent,
|
||||||
|
Colors.black45,
|
||||||
|
],
|
||||||
|
),
|
||||||
|
borderRadius: floor == 1
|
||||||
|
? null
|
||||||
|
: const BorderRadius.all(Radius.circular(6))),
|
||||||
|
child: Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.end,
|
||||||
|
children: [
|
||||||
|
DefaultTextStyle.merge(
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: Theme.of(context)
|
||||||
|
.textTheme
|
||||||
|
.labelMedium!
|
||||||
|
.fontSize,
|
||||||
|
color: Colors.white),
|
||||||
|
child: Row(
|
||||||
|
children: [
|
||||||
|
Text(item.modules.moduleDynamic.major.liveRcmd
|
||||||
|
.areaName ??
|
||||||
|
''),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}),
|
}),
|
||||||
),
|
),
|
||||||
|
|||||||
@ -78,72 +78,83 @@ Widget videoSeasonWidget(item, context, type, {floor = 1}) {
|
|||||||
],
|
],
|
||||||
LayoutBuilder(builder: (context, box) {
|
LayoutBuilder(builder: (context, box) {
|
||||||
double width = box.maxWidth;
|
double width = box.maxWidth;
|
||||||
return Stack(
|
return Container(
|
||||||
children: [
|
margin: floor == 1
|
||||||
NetworkImgLayer(
|
? const EdgeInsets.only(
|
||||||
type: floor == 1 ? 'emote' : null,
|
left: StyleString.safeSpace, right: StyleString.safeSpace)
|
||||||
width: width,
|
: EdgeInsets.zero,
|
||||||
height: width / StyleString.aspectRatio,
|
clipBehavior: Clip.hardEdge,
|
||||||
src: content.cover,
|
decoration: const BoxDecoration(
|
||||||
),
|
borderRadius: BorderRadius.all(StyleString.imgRadius)),
|
||||||
if (content.badge != null && content.badge['text'] != null)
|
child: Stack(
|
||||||
PBadge(
|
children: [
|
||||||
text: content.badge['text'],
|
NetworkImgLayer(
|
||||||
top: 8.0,
|
type: floor == 1 ? 'emote' : null,
|
||||||
right: 10.0,
|
width: width,
|
||||||
bottom: null,
|
height: width / StyleString.aspectRatio,
|
||||||
left: null,
|
src: content.cover,
|
||||||
),
|
),
|
||||||
Positioned(
|
if (content.badge != null && content.badge['text'] != null)
|
||||||
left: 0,
|
PBadge(
|
||||||
right: 0,
|
text: content.badge['text'],
|
||||||
bottom: 0,
|
top: 8.0,
|
||||||
child: Container(
|
right: 10.0,
|
||||||
height: 80,
|
bottom: null,
|
||||||
padding: const EdgeInsets.fromLTRB(12, 0, 10, 10),
|
left: null,
|
||||||
clipBehavior: Clip.hardEdge,
|
),
|
||||||
decoration: BoxDecoration(
|
Positioned(
|
||||||
gradient: const LinearGradient(
|
left: 0,
|
||||||
begin: Alignment.topCenter,
|
right: 0,
|
||||||
end: Alignment.bottomCenter,
|
bottom: 0,
|
||||||
colors: <Color>[
|
child: Container(
|
||||||
Colors.transparent,
|
height: 80,
|
||||||
Colors.black54,
|
padding: const EdgeInsets.fromLTRB(12, 0, 10, 10),
|
||||||
],
|
clipBehavior: Clip.hardEdge,
|
||||||
),
|
decoration: BoxDecoration(
|
||||||
borderRadius: floor == 1
|
gradient: const LinearGradient(
|
||||||
? null
|
begin: Alignment.topCenter,
|
||||||
: const BorderRadius.all(Radius.circular(6))),
|
end: Alignment.bottomCenter,
|
||||||
child: Row(
|
colors: <Color>[
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
Colors.transparent,
|
||||||
crossAxisAlignment: CrossAxisAlignment.end,
|
Colors.black54,
|
||||||
children: [
|
|
||||||
DefaultTextStyle.merge(
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize:
|
|
||||||
Theme.of(context).textTheme.labelMedium!.fontSize,
|
|
||||||
color: Colors.white),
|
|
||||||
child: Row(
|
|
||||||
children: [
|
|
||||||
Text(content.durationText ?? ''),
|
|
||||||
if (content.durationText != null)
|
|
||||||
const SizedBox(width: 10),
|
|
||||||
Text(content.stat.play + '次围观'),
|
|
||||||
const SizedBox(width: 10),
|
|
||||||
Text(content.stat.danmaku + '条弹幕')
|
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
borderRadius: floor == 1
|
||||||
Image.asset(
|
? null
|
||||||
'assets/images/play.png',
|
: const BorderRadius.all(Radius.circular(6))),
|
||||||
width: 60,
|
child: Row(
|
||||||
height: 60,
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
),
|
crossAxisAlignment: CrossAxisAlignment.end,
|
||||||
],
|
children: [
|
||||||
|
DefaultTextStyle.merge(
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: Theme.of(context)
|
||||||
|
.textTheme
|
||||||
|
.labelMedium!
|
||||||
|
.fontSize,
|
||||||
|
color: Colors.white),
|
||||||
|
child: Row(
|
||||||
|
children: [
|
||||||
|
Text(content.durationText ?? ''),
|
||||||
|
if (content.durationText != null)
|
||||||
|
const SizedBox(width: 10),
|
||||||
|
Text(content.stat.play + '次围观'),
|
||||||
|
const SizedBox(width: 10),
|
||||||
|
Text(content.stat.danmaku + '条弹幕')
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Image.asset(
|
||||||
|
'assets/images/play.png',
|
||||||
|
width: 60,
|
||||||
|
height: 60,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
],
|
||||||
],
|
),
|
||||||
);
|
);
|
||||||
}),
|
}),
|
||||||
const SizedBox(height: 6),
|
const SizedBox(height: 6),
|
||||||
|
|||||||
Reference in New Issue
Block a user