mod: 样式修改、历史记录修改
This commit is contained in:
@ -119,7 +119,7 @@ SPEC CHECKSUMS:
|
|||||||
FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a
|
FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a
|
||||||
image_gallery_saver: 259eab68fb271cfd57d599904f7acdc7832e7ef2
|
image_gallery_saver: 259eab68fb271cfd57d599904f7acdc7832e7ef2
|
||||||
media_kit_libs_ios_video: 96259eccffaa309b63a7ee610c2c7786a3b335e5
|
media_kit_libs_ios_video: 96259eccffaa309b63a7ee610c2c7786a3b335e5
|
||||||
media_kit_native_event_loop: 9f9eb778d0d806ab9486eff7513f7f90f07d50f8
|
media_kit_native_event_loop: 1eac6db2378101404392c80606103b42f7c2c491
|
||||||
media_kit_video: c6ae801433b484912087b519b45f1beac97b960b
|
media_kit_video: c6ae801433b484912087b519b45f1beac97b960b
|
||||||
path_provider_foundation: c68054786f1b4f3343858c1e1d0caaded73f0be9
|
path_provider_foundation: c68054786f1b4f3343858c1e1d0caaded73f0be9
|
||||||
permission_handler_apple: 44366e37eaf29454a1e7b1b7d736c2cceaeb17ce
|
permission_handler_apple: 44366e37eaf29454a1e7b1b7d736c2cceaeb17ce
|
||||||
|
@ -305,11 +305,11 @@ class VideoHttp {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 视频播放进度
|
// 视频播放进度
|
||||||
static Future heartBeat({bvid, progress, realtime}) async {
|
static Future heartBeat({bvid, cid, progress, realtime}) async {
|
||||||
var res = await Request().post(Api.heartBeat, queryParameters: {
|
var res = await Request().post(Api.heartBeat, queryParameters: {
|
||||||
// 'aid': aid,
|
// 'aid': aid,
|
||||||
'bvid': bvid,
|
'bvid': bvid,
|
||||||
// 'cid': '',
|
'cid': cid,
|
||||||
// 'epid': '',
|
// 'epid': '',
|
||||||
// 'sid': '',
|
// 'sid': '',
|
||||||
// 'mid': '',
|
// 'mid': '',
|
||||||
|
@ -20,10 +20,9 @@ class HistoryItem extends StatelessWidget {
|
|||||||
return InkWell(
|
return InkWell(
|
||||||
onTap: () async {
|
onTap: () async {
|
||||||
int cid = videoItem.history.cid ??
|
int cid = videoItem.history.cid ??
|
||||||
videoItem.history.oid ??
|
// videoItem.history.oid ??
|
||||||
await SearchHttp.ab2c(aid: aid, bvid: bvid);
|
await SearchHttp.ab2c(aid: aid, bvid: bvid);
|
||||||
await Future.delayed(const Duration(milliseconds: 200));
|
await Future.delayed(const Duration(milliseconds: 200));
|
||||||
print(videoItem.history.business);
|
|
||||||
if (videoItem.history.business.contains('article')) {
|
if (videoItem.history.business.contains('article')) {
|
||||||
Get.toNamed(
|
Get.toNamed(
|
||||||
'/webview',
|
'/webview',
|
||||||
|
@ -2,7 +2,6 @@ import 'package:flutter/material.dart';
|
|||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:pilipala/pages/home/index.dart';
|
import 'package:pilipala/pages/home/index.dart';
|
||||||
import 'package:pilipala/pages/hot/index.dart';
|
import 'package:pilipala/pages/hot/index.dart';
|
||||||
import 'package:salomon_bottom_bar/salomon_bottom_bar.dart';
|
|
||||||
import './controller.dart';
|
import './controller.dart';
|
||||||
|
|
||||||
class MainApp extends StatefulWidget {
|
class MainApp extends StatefulWidget {
|
||||||
@ -103,7 +102,6 @@ class _MainAppState extends State<MainApp> with SingleTickerProviderStateMixin {
|
|||||||
),
|
),
|
||||||
child: PageView(
|
child: PageView(
|
||||||
controller: _pageController,
|
controller: _pageController,
|
||||||
// physics: const NeverScrollableScrollPhysics(),
|
|
||||||
onPageChanged: (index) {
|
onPageChanged: (index) {
|
||||||
selectedIndex = index;
|
selectedIndex = index;
|
||||||
setState(() {});
|
setState(() {});
|
||||||
@ -112,16 +110,21 @@ class _MainAppState extends State<MainApp> with SingleTickerProviderStateMixin {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
bottomNavigationBar: SalomonBottomBar(
|
bottomNavigationBar: BottomNavigationBar(
|
||||||
currentIndex: selectedIndex,
|
currentIndex: selectedIndex,
|
||||||
|
type: BottomNavigationBarType.shifting,
|
||||||
|
selectedItemColor: Theme.of(context).colorScheme.primary,
|
||||||
|
unselectedItemColor: Theme.of(context).colorScheme.onSurfaceVariant,
|
||||||
|
selectedFontSize: 12.4,
|
||||||
onTap: (value) => setIndex(value),
|
onTap: (value) => setIndex(value),
|
||||||
items: _mainController.navigationBars.map((e) {
|
items: [
|
||||||
return SalomonBottomBarItem(
|
..._mainController.navigationBars.map((e) {
|
||||||
icon: e['icon'],
|
return BottomNavigationBarItem(
|
||||||
title: Text(e['label']),
|
icon: e['icon'],
|
||||||
selectedColor: Theme.of(context).colorScheme.primary,
|
label: e['label'],
|
||||||
);
|
);
|
||||||
}).toList(),
|
}).toList(),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -49,6 +49,8 @@ class VideoDetailController extends GetxController
|
|||||||
|
|
||||||
Timer? timer;
|
Timer? timer;
|
||||||
|
|
||||||
|
RxString bgCover = ''.obs;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void onInit() {
|
void onInit() {
|
||||||
super.onInit();
|
super.onInit();
|
||||||
@ -58,10 +60,12 @@ class VideoDetailController extends GetxController
|
|||||||
var args = Get.arguments['videoItem'];
|
var args = Get.arguments['videoItem'];
|
||||||
if (args.pic != null && args.pic != '') {
|
if (args.pic != null && args.pic != '') {
|
||||||
videoItem['pic'] = args.pic;
|
videoItem['pic'] = args.pic;
|
||||||
|
bgCover.value = args.pic;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (Get.arguments.containsKey('pic')) {
|
if (Get.arguments.containsKey('pic')) {
|
||||||
videoItem['pic'] = Get.arguments['pic'];
|
videoItem['pic'] = Get.arguments['pic'];
|
||||||
|
bgCover.value = Get.arguments['pic'];
|
||||||
}
|
}
|
||||||
heroTag = Get.arguments['heroTag'];
|
heroTag = Get.arguments['heroTag'];
|
||||||
}
|
}
|
||||||
@ -135,7 +139,11 @@ class VideoDetailController extends GetxController
|
|||||||
|
|
||||||
void markHeartBeat() async {
|
void markHeartBeat() async {
|
||||||
Duration progress = meeduPlayerController.position.value;
|
Duration progress = meeduPlayerController.position.value;
|
||||||
await VideoHttp.heartBeat(bvid: bvid, progress: progress.inSeconds);
|
await VideoHttp.heartBeat(
|
||||||
|
bvid: bvid,
|
||||||
|
cid: cid,
|
||||||
|
progress: progress.inSeconds,
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
@ -78,8 +78,13 @@ Widget seasonPanel(UgcSeason ugcSeason, cid) {
|
|||||||
padding: const EdgeInsets.fromLTRB(10, 10, 10, 10),
|
padding: const EdgeInsets.fromLTRB(10, 10, 10, 10),
|
||||||
child: Row(
|
child: Row(
|
||||||
children: [
|
children: [
|
||||||
Text('合集:${ugcSeason.title!}'),
|
Expanded(
|
||||||
const Spacer(),
|
child: Text(
|
||||||
|
'合集:${ugcSeason.title!}',
|
||||||
|
overflow: TextOverflow.ellipsis,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
const SizedBox(width: 15),
|
||||||
Text(
|
Text(
|
||||||
'${currentIndex + 1} / ${ugcSeason.epCount}',
|
'${currentIndex + 1} / ${ugcSeason.epCount}',
|
||||||
style: Theme.of(context).textTheme.labelSmall,
|
style: Theme.of(context).textTheme.labelSmall,
|
||||||
|
@ -345,10 +345,11 @@ class ReplyItemRow extends StatelessWidget {
|
|||||||
child: Container(
|
child: Container(
|
||||||
width: double.infinity,
|
width: double.infinity,
|
||||||
padding: EdgeInsets.fromLTRB(
|
padding: EdgeInsets.fromLTRB(
|
||||||
8,
|
8,
|
||||||
i == 0 && (extraRow == 1 || replies!.length > 1) ? 8 : 5,
|
i == 0 && (extraRow == 1 || replies!.length > 1) ? 8 : 5,
|
||||||
8,
|
8,
|
||||||
5),
|
i == 0 && (extraRow == 1 || replies!.length > 1) ? 5 : 6,
|
||||||
|
),
|
||||||
child: Text.rich(
|
child: Text.rich(
|
||||||
overflow: extraRow == 1
|
overflow: extraRow == 1
|
||||||
? TextOverflow.ellipsis
|
? TextOverflow.ellipsis
|
||||||
|
@ -31,11 +31,6 @@ class _VideoDetailPageState extends State<VideoDetailPage>
|
|||||||
final ScrollController _extendNestCtr = ScrollController();
|
final ScrollController _extendNestCtr = ScrollController();
|
||||||
late AnimationController animationController;
|
late AnimationController animationController;
|
||||||
|
|
||||||
// final _meeduPlayerController = MeeduPlayerController(
|
|
||||||
// pipEnabled: true,
|
|
||||||
// controlsStyle: ControlsStyle.secondary,
|
|
||||||
// enabledButtons: const EnabledButtons(pip: true),
|
|
||||||
// );
|
|
||||||
StreamSubscription? _playerEventSubs;
|
StreamSubscription? _playerEventSubs;
|
||||||
bool isPlay = false;
|
bool isPlay = false;
|
||||||
PlayerStatus playerStatus = PlayerStatus.paused;
|
PlayerStatus playerStatus = PlayerStatus.paused;
|
||||||
@ -154,11 +149,13 @@ class _VideoDetailPageState extends State<VideoDetailPage>
|
|||||||
top: 0,
|
top: 0,
|
||||||
left: 0,
|
left: 0,
|
||||||
right: 0,
|
right: 0,
|
||||||
child: NetworkImgLayer(
|
child: Obx(
|
||||||
type: 'emote',
|
() => NetworkImgLayer(
|
||||||
src: videoDetailController.videoItem['pic'],
|
type: 'emote',
|
||||||
width: Get.size.width,
|
src: videoDetailController.bgCover.value,
|
||||||
height: videoHeight + 100,
|
width: Get.size.width,
|
||||||
|
height: videoHeight,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Positioned.fill(
|
Positioned.fill(
|
||||||
@ -226,15 +223,6 @@ class _VideoDetailPageState extends State<VideoDetailPage>
|
|||||||
size: 19,
|
size: 19,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
title: Text(
|
|
||||||
'视频详情',
|
|
||||||
style: TextStyle(
|
|
||||||
color: Colors.white,
|
|
||||||
fontSize: Theme.of(context)
|
|
||||||
.textTheme
|
|
||||||
.titleSmall!
|
|
||||||
.fontSize),
|
|
||||||
),
|
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
@ -304,14 +292,6 @@ class _VideoDetailPageState extends State<VideoDetailPage>
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
// 弹幕开关
|
|
||||||
// const Spacer(),
|
|
||||||
// Flexible(
|
|
||||||
// flex: 2,
|
|
||||||
// child: Container(
|
|
||||||
// height: 50,
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
34
pubspec.lock
34
pubspec.lock
@ -400,7 +400,7 @@ packages:
|
|||||||
description:
|
description:
|
||||||
path: package
|
path: package
|
||||||
ref: feature-custom
|
ref: feature-custom
|
||||||
resolved-ref: b8a145a796c537e312fd8e5e1ba299020f8032db
|
resolved-ref: ea73de29401ab35126ef3eac68270b2e6c3ef4e0
|
||||||
url: "https://github.com/guozhigq/flutter_meedu_media_kit.git"
|
url: "https://github.com/guozhigq/flutter_meedu_media_kit.git"
|
||||||
source: git
|
source: git
|
||||||
version: "4.2.12"
|
version: "4.2.12"
|
||||||
@ -618,18 +618,18 @@ packages:
|
|||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: media_kit
|
name: media_kit
|
||||||
sha256: "080cfb5af8d04f8cc454cb4c5ea34b19de5b8e1a1b3af62a34e766364b5244ad"
|
sha256: "8c7d9417bed724a3fcaadd91c722fea042737cafb153aa1f1e6461a0fee683a3"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.0.11"
|
version: "1.0.2"
|
||||||
media_kit_libs_android_video:
|
media_kit_libs_android_video:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: media_kit_libs_android_video
|
name: media_kit_libs_android_video
|
||||||
sha256: daeaeb254aee1089fa77f11cbeb0864a1238cbd0cb2a1c5ab9b2a2e66cc5ff42
|
sha256: "228c3b182831e194bb178d4d22a1839af812c917cb76fe87d6fdc9ea4328dc81"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.0.6"
|
version: "1.1.1"
|
||||||
media_kit_libs_ios_video:
|
media_kit_libs_ios_video:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@ -666,18 +666,18 @@ packages:
|
|||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: media_kit_native_event_loop
|
name: media_kit_native_event_loop
|
||||||
sha256: "521125e534603c3f603b93283db3938f557f33ecc383fbd62edd4beb3bf73747"
|
sha256: "5351f0c28124b5358756515d8619abad182cdefe967468d7fb5b274737cc2f59"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.0.4"
|
version: "1.0.6"
|
||||||
media_kit_video:
|
media_kit_video:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: media_kit_video
|
name: media_kit_video
|
||||||
sha256: "89d3c2cdb0f74d1bb597a9c9a7678f656fe538d20620ad1317b7354fd5d1af15"
|
sha256: d31a0eab80cafadccdedb663d8a127750e38b8c75c1aa83d8943f8119b88cf99
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.0.12"
|
version: "1.0.2"
|
||||||
meedu:
|
meedu:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@ -902,14 +902,6 @@ packages:
|
|||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.0.2"
|
version: "1.0.2"
|
||||||
salomon_bottom_bar:
|
|
||||||
dependency: "direct main"
|
|
||||||
description:
|
|
||||||
name: salomon_bottom_bar
|
|
||||||
sha256: e20abf2e449749432223a8b4e6647c212eef6c2b638e0ed8cc92eff9529c2b48
|
|
||||||
url: "https://pub.dev"
|
|
||||||
source: hosted
|
|
||||||
version: "3.3.2"
|
|
||||||
screen_brightness:
|
screen_brightness:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@ -966,6 +958,14 @@ packages:
|
|||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.1.6"
|
version: "0.1.6"
|
||||||
|
screenshot:
|
||||||
|
dependency: "direct main"
|
||||||
|
description:
|
||||||
|
name: screenshot
|
||||||
|
sha256: "30bb9fade6eb2578a1fc2e84f6b184141fc86883cda10988d4500ff00eb728e2"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "1.3.0"
|
||||||
share_plus:
|
share_plus:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
|
@ -79,7 +79,7 @@ dependencies:
|
|||||||
url: https://github.com/guozhigq/flutter_meedu_media_kit.git
|
url: https://github.com/guozhigq/flutter_meedu_media_kit.git
|
||||||
ref: feature-custom
|
ref: feature-custom
|
||||||
path: package
|
path: package
|
||||||
salomon_bottom_bar: ^3.3.2
|
screenshot: ^1.3.0
|
||||||
|
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
flutter_test:
|
flutter_test:
|
||||||
|
Reference in New Issue
Block a user