mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
@@ -88,7 +88,9 @@ abstract class CommonDynPageState<T extends StatefulWidget> extends State<T>
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
scrollController.dispose();
|
||||
scrollController
|
||||
..removeListener(listener)
|
||||
..dispose();
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
|
||||
@@ -170,8 +170,7 @@ class _MusicDetailPageState extends CommonDynPageState<MusicDetailPage> {
|
||||
body: refreshIndicator(
|
||||
onRefresh: controller.onRefresh,
|
||||
child: CustomScrollView(
|
||||
controller: controller
|
||||
.scrollController, // debug: The provided ScrollController is attached to more than one ScrollPosition.
|
||||
controller: scrollController,
|
||||
physics: const AlwaysScrollableScrollPhysics(),
|
||||
slivers: [
|
||||
buildReplyHeader(theme),
|
||||
|
||||
@@ -981,31 +981,27 @@ List<SettingsModel> get extraSettings => [
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
const SizedBox(height: 6),
|
||||
TextField(
|
||||
decoration: InputDecoration(
|
||||
TextFormField(
|
||||
initialValue: systemProxyHost,
|
||||
decoration: const InputDecoration(
|
||||
isDense: true,
|
||||
labelText: systemProxyHost.isNotEmpty
|
||||
? systemProxyHost
|
||||
: '请输入Host,使用 . 分割',
|
||||
border: const OutlineInputBorder(
|
||||
labelText: '请输入Host,使用 . 分割',
|
||||
border: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.all(Radius.circular(6)),
|
||||
),
|
||||
hintText: systemProxyHost,
|
||||
),
|
||||
onChanged: (e) => systemProxyHost = e,
|
||||
),
|
||||
const SizedBox(height: 10),
|
||||
TextField(
|
||||
TextFormField(
|
||||
initialValue: systemProxyPort,
|
||||
keyboardType: TextInputType.number,
|
||||
decoration: InputDecoration(
|
||||
decoration: const InputDecoration(
|
||||
isDense: true,
|
||||
labelText: systemProxyPort.isNotEmpty
|
||||
? systemProxyPort
|
||||
: '请输入Port',
|
||||
border: const OutlineInputBorder(
|
||||
labelText: '请输入Port',
|
||||
border: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.all(Radius.circular(6)),
|
||||
),
|
||||
hintText: systemProxyPort,
|
||||
),
|
||||
inputFormatters: [FilteringTextInputFormatter.digitsOnly],
|
||||
onChanged: (e) => systemProxyPort = e,
|
||||
|
||||
@@ -1108,7 +1108,8 @@ class PlPlayerController {
|
||||
} else if (event.startsWith('Could not open codec')) {
|
||||
SmartDialog.showToast('无法加载解码器, $event,可能会切换至软解');
|
||||
} else if (!onlyPlayAudio.value) {
|
||||
if (event.startsWith("Failed to open .") ||
|
||||
if (event.startsWith("error running") ||
|
||||
event.startsWith("Failed to open .") ||
|
||||
event.startsWith("Cannot open") ||
|
||||
event.startsWith("Can not open")) {
|
||||
return;
|
||||
@@ -1442,14 +1443,9 @@ class PlPlayerController {
|
||||
}
|
||||
}
|
||||
|
||||
int _durationInSeconds(Duration duration) {
|
||||
return (duration.inMilliseconds / 1000).round();
|
||||
}
|
||||
|
||||
bool get _isCompleted =>
|
||||
videoPlayerController!.state.completed ||
|
||||
(_durationInSeconds(position.value) ==
|
||||
_durationInSeconds(duration.value));
|
||||
(duration.value - position.value).inMilliseconds <= 50;
|
||||
|
||||
// 双击播放、暂停
|
||||
Future<void> onDoubleTapCenter() async {
|
||||
|
||||
Reference in New Issue
Block a user