mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
opt: episodes showing
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
import 'dart:math';
|
||||
|
||||
import 'package:PiliPalaX/common/widgets/list_sheet.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:PiliPalaX/models/video_detail_res.dart';
|
||||
@@ -16,12 +15,14 @@ class PagesPanel extends StatefulWidget {
|
||||
required this.bvid,
|
||||
required this.changeFuc,
|
||||
required this.heroTag,
|
||||
required this.showEpisodes,
|
||||
});
|
||||
final List<Part> pages;
|
||||
final int? cid;
|
||||
final String bvid;
|
||||
final Function changeFuc;
|
||||
final String heroTag;
|
||||
final Function showEpisodes;
|
||||
|
||||
@override
|
||||
State<PagesPanel> createState() => _PagesPanelState();
|
||||
@@ -94,16 +95,8 @@ class _PagesPanelState extends State<PagesPanel> {
|
||||
style: ButtonStyle(
|
||||
padding: WidgetStateProperty.all(EdgeInsets.zero),
|
||||
),
|
||||
onPressed: () {
|
||||
ListSheet(
|
||||
episodes: episodes,
|
||||
bvid: widget.bvid,
|
||||
aid: IdUtils.bv2av(widget.bvid),
|
||||
currentCid: cid,
|
||||
changeFucCall: widget.changeFuc,
|
||||
context: context,
|
||||
).buildShowBottomSheet();
|
||||
},
|
||||
onPressed: () => widget.showEpisodes(
|
||||
episodes, widget.bvid, IdUtils.bv2av(widget.bvid), cid),
|
||||
child: Text(
|
||||
'共${widget.pages.length}集',
|
||||
style: const TextStyle(fontSize: 13),
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import 'package:PiliPalaX/common/widgets/list_sheet.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:PiliPalaX/models/video_detail_res.dart';
|
||||
@@ -11,11 +10,13 @@ class SeasonPanel extends StatefulWidget {
|
||||
this.cid,
|
||||
required this.changeFuc,
|
||||
required this.heroTag,
|
||||
required this.showEpisodes,
|
||||
});
|
||||
final UgcSeason ugcSeason;
|
||||
final int? cid;
|
||||
final Function changeFuc;
|
||||
final String heroTag;
|
||||
final Function showEpisodes;
|
||||
|
||||
@override
|
||||
State<SeasonPanel> createState() => _SeasonPanelState();
|
||||
@@ -102,16 +103,7 @@ class _SeasonPanelState extends State<SeasonPanel> {
|
||||
borderRadius: BorderRadius.circular(6),
|
||||
clipBehavior: Clip.hardEdge,
|
||||
child: InkWell(
|
||||
onTap: () {
|
||||
ListSheet(
|
||||
episodes: episodes,
|
||||
// bvid: IdUtils.av2bv(episodes!.first.aid!),
|
||||
// aid: episodes!.first.aid!,
|
||||
currentCid: cid,
|
||||
changeFucCall: widget.changeFuc,
|
||||
context: context)
|
||||
.buildShowBottomSheet();
|
||||
},
|
||||
onTap: () => widget.showEpisodes(episodes, null, null, cid),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.fromLTRB(8, 12, 8, 12),
|
||||
child: Row(
|
||||
|
||||
Reference in New Issue
Block a user