mod: 样式修改

This commit is contained in:
guozhigq
2023-07-17 12:04:55 +08:00
parent c140d55200
commit b03dd6217a
4 changed files with 61 additions and 21 deletions

View File

@ -225,7 +225,7 @@ class VideoStat extends StatelessWidget {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Container( return Container(
height: 45, height: 45,
padding: const EdgeInsets.only(top: 22, left: 8, right: 10), padding: const EdgeInsets.only(top: 22, left: 6, right: 6),
decoration: const BoxDecoration( decoration: const BoxDecoration(
gradient: LinearGradient( gradient: LinearGradient(
begin: Alignment.topCenter, begin: Alignment.topCenter,
@ -246,7 +246,7 @@ class VideoStat extends StatelessWidget {
theme: 'white', theme: 'white',
view: view, view: view,
), ),
const SizedBox(width: 8), const SizedBox(width: 6),
StatDanMu( StatDanMu(
theme: 'white', theme: 'white',
danmu: danmaku, danmu: danmaku,

View File

@ -99,7 +99,7 @@ class _LivePageState extends State<LivePage> {
// 行间距 // 行间距
mainAxisSpacing: StyleString.cardSpace + 2, mainAxisSpacing: StyleString.cardSpace + 2,
// 列间距 // 列间距
crossAxisSpacing: StyleString.cardSpace + 2, crossAxisSpacing: StyleString.cardSpace + 3,
// 列数 // 列数
crossAxisCount: ctr.crossAxisCount, crossAxisCount: ctr.crossAxisCount,
mainAxisExtent: mainAxisExtent:

View File

@ -24,7 +24,7 @@ class LiveCardV extends StatelessWidget {
String heroTag = Utils.makeHeroTag(liveItem.roomId); String heroTag = Utils.makeHeroTag(liveItem.roomId);
return Card( return Card(
elevation: 0, elevation: 0,
clipBehavior: Clip.hardEdge, // clipBehavior: Clip.hardEdge,
// shape: RoundedRectangleBorder( // shape: RoundedRectangleBorder(
// borderRadius: StyleString.mdRadius, // borderRadius: StyleString.mdRadius,
// ), // ),
@ -70,6 +70,18 @@ class LiveCardV extends StatelessWidget {
height: maxHeight, height: maxHeight,
), ),
), ),
Positioned(
left: 0,
right: 0,
bottom: 0,
child: AnimatedOpacity(
opacity: 1,
duration: const Duration(milliseconds: 200),
child: VideoStat(
liveItem: liveItem,
),
),
),
], ],
); );
}), }),
@ -92,9 +104,10 @@ class LiveContent extends StatelessWidget {
return Expanded( return Expanded(
child: Padding( child: Padding(
// 多列 // 多列
padding: const EdgeInsets.fromLTRB(4, 5, 6, 4), padding: const EdgeInsets.fromLTRB(4, 5, 6, 8),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
Text( Text(
liveItem.title, liveItem.title,
@ -104,7 +117,7 @@ class LiveContent extends StatelessWidget {
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
letterSpacing: 0.3, letterSpacing: 0.3,
), ),
maxLines: 1, maxLines: 2,
overflow: TextOverflow.ellipsis, overflow: TextOverflow.ellipsis,
), ),
const SizedBox(height: 4), const SizedBox(height: 4),
@ -125,23 +138,50 @@ class LiveContent extends StatelessWidget {
) )
], ],
), ),
const SizedBox(height: 2),
Row(
children: [
Text(
'${'[' + liveItem.areaName}]',
style: const TextStyle(fontSize: 11),
),
const Text(''),
Text(
liveItem.watchedShow['text_large'],
style: const TextStyle(fontSize: 11),
),
],
),
], ],
), ),
), ),
); );
} }
} }
class VideoStat extends StatelessWidget {
final LiveItemModel? liveItem;
const VideoStat({
Key? key,
required this.liveItem,
}) : super(key: key);
@override
Widget build(BuildContext context) {
return Container(
height: 45,
padding: const EdgeInsets.only(top: 22, left: 10, right: 10),
decoration: const BoxDecoration(
gradient: LinearGradient(
begin: Alignment.topCenter,
end: Alignment.bottomCenter,
colors: <Color>[
Colors.transparent,
Colors.black54,
],
tileMode: TileMode.mirror,
),
),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
liveItem!.areaName!,
style: const TextStyle(fontSize: 11, color: Colors.white),
),
Text(
liveItem!.watchedShow!['text_small'],
style: const TextStyle(fontSize: 11, color: Colors.white),
),
],
),
);
}
}

View File

@ -101,7 +101,7 @@ class _RcmdPageState extends State<RcmdPage>
// 行间距 // 行间距
mainAxisSpacing: StyleString.cardSpace + 2, mainAxisSpacing: StyleString.cardSpace + 2,
// 列间距 // 列间距
crossAxisSpacing: StyleString.cardSpace + 2, crossAxisSpacing: StyleString.cardSpace + 3,
// 列数 // 列数
crossAxisCount: ctr.crossAxisCount, crossAxisCount: ctr.crossAxisCount,
mainAxisExtent: mainAxisExtent: