mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
chore: code clean up
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -3,7 +3,6 @@ import 'dart:math';
|
||||
|
||||
import 'package:PiliPalaX/grpc/grpc_repo.dart';
|
||||
import 'package:PiliPalaX/http/loading_state.dart';
|
||||
import 'package:PiliPalaX/http/member.dart';
|
||||
import 'package:PiliPalaX/utils/utils.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
@@ -24,8 +23,6 @@ import 'package:PiliPalaX/utils/feed_back.dart';
|
||||
import 'package:PiliPalaX/utils/id_utils.dart';
|
||||
import 'package:PiliPalaX/utils/storage.dart';
|
||||
import 'package:share_plus/share_plus.dart';
|
||||
import 'package:PiliPalaX/pages/member/controller.dart';
|
||||
import 'package:url_launcher/url_launcher.dart';
|
||||
|
||||
import '../../../../http/search.dart';
|
||||
import '../../../../models/model_hot_video_item.dart';
|
||||
@@ -180,7 +177,6 @@ class VideoIntroController extends GetxController
|
||||
Future queryUserStat() async {
|
||||
var result = await UserHttp.userStat(mid: videoDetail.value.owner!.mid!);
|
||||
if (result['status']) {
|
||||
print(result['data']);
|
||||
userStat.value = result['data'];
|
||||
userStat.refresh();
|
||||
}
|
||||
@@ -288,7 +284,6 @@ class VideoIntroController extends GetxController
|
||||
void coinVideo(int coin) async {
|
||||
var res = await VideoHttp.coinVideo(bvid: bvid, multiply: coin);
|
||||
if (res['status']) {
|
||||
print(res);
|
||||
SmartDialog.showToast('投币成功');
|
||||
hasCoin.value = true;
|
||||
videoDetail.value.stat!.coin = videoDetail.value.stat!.coin! + coin;
|
||||
@@ -393,7 +388,7 @@ class VideoIntroController extends GetxController
|
||||
}
|
||||
} catch (e) {
|
||||
// ignore: avoid_print
|
||||
print(e);
|
||||
debugPrint(e.toString());
|
||||
}
|
||||
SmartDialog.showLoading(msg: '请求中');
|
||||
var result = await VideoHttp.favVideo(
|
||||
|
||||
@@ -115,14 +115,14 @@ class VideoInfo extends StatefulWidget {
|
||||
final Function showEpisodes;
|
||||
|
||||
const VideoInfo({
|
||||
Key? key,
|
||||
super.key,
|
||||
this.loadingStatus = false,
|
||||
this.videoDetail,
|
||||
this.heroTag,
|
||||
required this.showAiBottomSheet,
|
||||
required this.showIntroDetail,
|
||||
required this.showEpisodes,
|
||||
}) : super(key: key);
|
||||
});
|
||||
|
||||
@override
|
||||
State<VideoInfo> createState() => _VideoInfoState();
|
||||
@@ -300,10 +300,7 @@ class _VideoInfoState extends State<VideoInfo> with TickerProviderStateMixin {
|
||||
const SizedBox(height: 0),
|
||||
Obx(
|
||||
() => Text(
|
||||
Utils.numFormat(videoIntroController
|
||||
.userStat.value['follower']),
|
||||
semanticsLabel:
|
||||
"${Utils.numFormat(videoIntroController.userStat.value['follower'])}粉丝",
|
||||
'${Utils.numFormat(videoIntroController.userStat.value['follower'])}粉丝',
|
||||
style: TextStyle(
|
||||
fontSize: 12,
|
||||
color: t.colorScheme.outline,
|
||||
|
||||
@@ -17,7 +17,7 @@ class ActionItem extends StatefulWidget {
|
||||
final Function? callBack;
|
||||
|
||||
const ActionItem({
|
||||
Key? key,
|
||||
super.key,
|
||||
this.icon,
|
||||
this.selectIcon,
|
||||
this.onTap,
|
||||
@@ -29,7 +29,7 @@ class ActionItem extends StatefulWidget {
|
||||
this.hasOneThree = false,
|
||||
this.callBack,
|
||||
required this.semanticsLabel,
|
||||
}) : super(key: key);
|
||||
});
|
||||
|
||||
@override
|
||||
State<ActionItem> createState() => ActionItemState();
|
||||
|
||||
@@ -11,7 +11,7 @@ class ActionRowItem extends StatelessWidget {
|
||||
final Function? onLongPress;
|
||||
|
||||
const ActionRowItem({
|
||||
Key? key,
|
||||
super.key,
|
||||
this.icon,
|
||||
this.selectIcon,
|
||||
this.onTap,
|
||||
@@ -19,7 +19,7 @@ class ActionRowItem extends StatelessWidget {
|
||||
this.text,
|
||||
this.selectStatus = false,
|
||||
this.onLongPress,
|
||||
}) : super(key: key);
|
||||
});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
|
||||
@@ -6,8 +6,6 @@ import 'package:PiliPalaX/http/member.dart';
|
||||
import 'package:PiliPalaX/models/member/tags.dart';
|
||||
import 'package:PiliPalaX/utils/feed_back.dart';
|
||||
|
||||
import '../../../../../utils/utils.dart';
|
||||
|
||||
class GroupPanel extends StatefulWidget {
|
||||
final int? mid;
|
||||
final List? tags;
|
||||
|
||||
@@ -12,7 +12,7 @@ class MenuRow extends StatelessWidget {
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
width: double.infinity,
|
||||
color: Theme.of(context).colorScheme.background,
|
||||
color: Theme.of(context).colorScheme.surface,
|
||||
padding: const EdgeInsets.only(top: 9, bottom: 9, left: 12),
|
||||
child: SingleChildScrollView(
|
||||
scrollDirection: Axis.horizontal,
|
||||
@@ -84,7 +84,7 @@ class MenuRow extends StatelessWidget {
|
||||
style: TextStyle(
|
||||
fontSize: 13,
|
||||
color: selectStatus
|
||||
? Theme.of(context).colorScheme.onBackground
|
||||
? Theme.of(context).colorScheme.onSurface
|
||||
: Theme.of(context).colorScheme.outline),
|
||||
),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user