opt: stat组件传参

This commit is contained in:
guozhigq
2024-09-11 20:25:40 +08:00
parent e3b7aed888
commit a5e2414a75
12 changed files with 73 additions and 48 deletions

View File

@ -255,13 +255,11 @@ class _BangumiInfoState extends State<BangumiInfo> {
Row(
children: [
StatView(
theme: 'gray',
view: widget.bangumiDetail!.stat!['views'],
size: 'medium',
),
const SizedBox(width: 6),
StatDanMu(
theme: 'gray',
danmu: widget.bangumiDetail!.stat!['danmakus'],
size: 'medium',
),

View File

@ -60,13 +60,11 @@ class IntroDetail extends StatelessWidget {
Row(
children: [
StatView(
theme: 'gray',
view: bangumiDetail!.stat!['views'],
size: 'medium',
),
const SizedBox(width: 6),
StatDanMu(
theme: 'gray',
danmu: bangumiDetail!.stat!['danmakus'],
size: 'medium',
),

View File

@ -203,13 +203,9 @@ class VideoContent extends StatelessWidget {
padding: const EdgeInsets.only(top: 2),
child: Row(
children: [
StatView(
theme: 'gray',
view: videoItem.cntInfo['play'],
),
StatView(view: videoItem.cntInfo['play']),
const SizedBox(width: 8),
StatDanMu(
theme: 'gray', danmu: videoItem.cntInfo['danmaku']),
StatDanMu(danmu: videoItem.cntInfo['danmaku']),
const Spacer(),
],
),

View File

@ -69,10 +69,7 @@ class MemberCoinsItem extends StatelessWidget {
const SizedBox(height: 4),
Row(
children: [
StatView(
view: coinItem.view,
theme: 'gray',
),
StatView(view: coinItem.view),
const Spacer(),
Text(
Utils.CustomStamp_str(

View File

@ -69,10 +69,7 @@ class MemberLikeItem extends StatelessWidget {
const SizedBox(height: 4),
Row(
children: [
StatView(
view: likeItem.stat!.view,
theme: 'gray',
),
StatView(view: likeItem.stat!.view),
const Spacer(),
Text(
Utils.CustomStamp_str(

View File

@ -78,10 +78,7 @@ class MemberSeasonsItem extends StatelessWidget {
const SizedBox(height: 4),
Row(
children: [
StatView(
view: seasonItem.view,
theme: 'gray',
),
StatView(view: seasonItem.view),
const Spacer(),
Text(
Utils.CustomStamp_str(

View File

@ -154,13 +154,9 @@ class VideoContent extends StatelessWidget {
padding: const EdgeInsets.only(top: 2),
child: Row(
children: [
StatView(
theme: 'gray',
view: videoItem.cntInfo['play'],
),
StatView(view: videoItem.cntInfo['play']),
const SizedBox(width: 8),
StatDanMu(
theme: 'gray', danmu: videoItem.cntInfo['danmaku']),
StatDanMu(danmu: videoItem.cntInfo['danmaku']),
const Spacer(),
],
),

View File

@ -346,13 +346,11 @@ class _VideoInfoState extends State<VideoInfo> with TickerProviderStateMixin {
child: Row(
children: [
StatView(
theme: 'gray',
view: widget.videoDetail!.stat!.view,
size: 'medium',
),
const SizedBox(width: 10),
StatDanMu(
theme: 'gray',
danmu: widget.videoDetail!.stat!.danmaku,
size: 'medium',
),