Skip to content

Commit

Permalink
Merge branch 'fix-bangumi'
Browse files Browse the repository at this point in the history
  • Loading branch information
guozhigq committed Mar 16, 2024
2 parents 4865948 + 1b54f07 commit beb640a
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 23 deletions.
1 change: 1 addition & 0 deletions lib/pages/bangumi/introduction/view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,7 @@ class _BangumiInfoState extends State<BangumiInfo> {
sheetHeight: sheetHeight,
changeFuc: (bvid, cid, aid) =>
bangumiIntroController.changeSeasonOrbangu(bvid, cid, aid),
bangumiDetail: bangumiIntroController.bangumiDetail.value,
)
],
],
Expand Down
42 changes: 19 additions & 23 deletions lib/pages/bangumi/widgets/bangumi_panel.dart
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,14 @@ class BangumiPanel extends StatefulWidget {
this.cid,
this.sheetHeight,
this.changeFuc,
this.bangumiDetail,
});

final List<EpisodeItem> pages;
final int? cid;
final double? sheetHeight;
final Function? changeFuc;
final BangumiInfoModel? bangumiDetail;

@override
State<BangumiPanel> createState() => _BangumiPanelState();
Expand Down Expand Up @@ -87,7 +89,7 @@ class _BangumiPanelState extends State<BangumiPanel> {
)
: null,
title: Text(
'第${index + 1}话 ${page.longTitle!}',
'第${page.title}话 ${page.longTitle!}',
style: TextStyle(
fontSize: 14,
color: isCurrentIndex
Expand All @@ -96,9 +98,11 @@ class _BangumiPanelState extends State<BangumiPanel> {
),
),
trailing: page.badge != null
? Image.asset(
'assets/images/big-vip.png',
height: 20,
? Text(
page.badge!,
style: TextStyle(
color: Theme.of(context).colorScheme.primary,
),
)
: const SizedBox(),
);
Expand Down Expand Up @@ -201,11 +205,11 @@ class _BangumiPanelState extends State<BangumiPanel> {
return Column(
children: [
Padding(
padding: const EdgeInsets.only(top: 10, bottom: 6),
padding: const EdgeInsets.only(top: 10, bottom: 10),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
const Text('合集 '),
const Text('选集 '),
Expanded(
child: Text(
' 正在播放:${widget.pages[currentIndex].longTitle}',
Expand All @@ -225,7 +229,7 @@ class _BangumiPanelState extends State<BangumiPanel> {
),
onPressed: () => showBangumiPanel(),
child: Text(
'${widget.pages.length}话',
'${widget.bangumiDetail!.newEp!['desc']}',
style: const TextStyle(fontSize: 13),
),
),
Expand Down Expand Up @@ -278,23 +282,15 @@ class _BangumiPanelState extends State<BangumiPanel> {
),
const SizedBox(width: 2),
if (widget.pages[i].badge != null) ...[
if (widget.pages[i].badge == '会员') ...[
Image.asset(
'assets/images/big-vip.png',
height: 16,
const Spacer(),
Text(
widget.pages[i].badge!,
style: TextStyle(
fontSize: 12,
color:
Theme.of(context).colorScheme.primary,
),
],
if (widget.pages[i].badge != '会员') ...[
const Spacer(),
Text(
widget.pages[i].badge!,
style: TextStyle(
fontSize: 11,
color:
Theme.of(context).colorScheme.primary,
),
),
],
),
]
],
),
Expand Down

0 comments on commit beb640a

Please sign in to comment.