mod: 视频操作区图标
This commit is contained in:
@ -2,6 +2,7 @@ import 'package:easy_debounce/easy_throttle.dart';
|
|||||||
import 'package:expandable/expandable.dart';
|
import 'package:expandable/expandable.dart';
|
||||||
import 'package:flutter/services.dart';
|
import 'package:flutter/services.dart';
|
||||||
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
|
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
|
||||||
|
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:hive/hive.dart';
|
import 'package:hive/hive.dart';
|
||||||
@ -629,11 +630,12 @@ class _VideoInfoState extends State<VideoInfo> with TickerProviderStateMixin {
|
|||||||
child: Icon(
|
child: Icon(
|
||||||
key: ValueKey<bool>(likeStatus),
|
key: ValueKey<bool>(likeStatus),
|
||||||
likeStatus
|
likeStatus
|
||||||
? Icons.thumb_up
|
? FontAwesomeIcons.solidThumbsUp
|
||||||
: Icons.thumb_up_alt_outlined,
|
: FontAwesomeIcons.thumbsUp,
|
||||||
color: likeStatus
|
color: likeStatus
|
||||||
? colorScheme.primary
|
? colorScheme.primary
|
||||||
: colorScheme.outline,
|
: colorScheme.outline,
|
||||||
|
size: 21,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(height: 6),
|
const SizedBox(height: 6),
|
||||||
@ -663,7 +665,8 @@ class _VideoInfoState extends State<VideoInfo> with TickerProviderStateMixin {
|
|||||||
(const IconThemeData.fallback().size! + 5) / 2,
|
(const IconThemeData.fallback().size! + 5) / 2,
|
||||||
child: progressWidget(_progress)),
|
child: progressWidget(_progress)),
|
||||||
ActionItem(
|
ActionItem(
|
||||||
icon: Image.asset('assets/images/coin.png', width: 30),
|
icon: const Icon(FontAwesomeIcons.b),
|
||||||
|
selectIcon: const Icon(FontAwesomeIcons.b),
|
||||||
onTap: handleState(videoIntroController.actionCoinVideo),
|
onTap: handleState(videoIntroController.actionCoinVideo),
|
||||||
selectStatus: videoIntroController.hasCoin.value,
|
selectStatus: videoIntroController.hasCoin.value,
|
||||||
text: widget.videoDetail!.stat!.coin!.toString(),
|
text: widget.videoDetail!.stat!.coin!.toString(),
|
||||||
@ -681,8 +684,8 @@ class _VideoInfoState extends State<VideoInfo> with TickerProviderStateMixin {
|
|||||||
(const IconThemeData.fallback().size! + 5) / 2,
|
(const IconThemeData.fallback().size! + 5) / 2,
|
||||||
child: progressWidget(_progress)),
|
child: progressWidget(_progress)),
|
||||||
ActionItem(
|
ActionItem(
|
||||||
icon: const Icon(Icons.star_border),
|
icon: const Icon(FontAwesomeIcons.star),
|
||||||
selectIcon: const Icon(Icons.star),
|
selectIcon: const Icon(FontAwesomeIcons.solidStar),
|
||||||
onTap: () => showFavBottomSheet(),
|
onTap: () => showFavBottomSheet(),
|
||||||
onLongPress: () => showFavBottomSheet(type: 'longPress'),
|
onLongPress: () => showFavBottomSheet(type: 'longPress'),
|
||||||
selectStatus: videoIntroController.hasFav.value,
|
selectStatus: videoIntroController.hasFav.value,
|
||||||
@ -692,7 +695,7 @@ class _VideoInfoState extends State<VideoInfo> with TickerProviderStateMixin {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
'watchLater': ActionItem(
|
'watchLater': ActionItem(
|
||||||
icon: const Icon(Icons.watch_later_outlined),
|
icon: const Icon(FontAwesomeIcons.clock),
|
||||||
onTap: () async {
|
onTap: () async {
|
||||||
final res =
|
final res =
|
||||||
await UserHttp.toViewLater(bvid: widget.videoDetail!.bvid);
|
await UserHttp.toViewLater(bvid: widget.videoDetail!.bvid);
|
||||||
@ -702,15 +705,15 @@ class _VideoInfoState extends State<VideoInfo> with TickerProviderStateMixin {
|
|||||||
text: '稍后看',
|
text: '稍后看',
|
||||||
),
|
),
|
||||||
'share': ActionItem(
|
'share': ActionItem(
|
||||||
icon: const Icon(Icons.share),
|
icon: const Icon(FontAwesomeIcons.shareFromSquare),
|
||||||
onTap: () => videoIntroController.actionShareVideo(),
|
onTap: () => videoIntroController.actionShareVideo(),
|
||||||
selectStatus: false,
|
selectStatus: false,
|
||||||
text: '分享',
|
text: '分享',
|
||||||
),
|
),
|
||||||
'dislike': Obx(
|
'dislike': Obx(
|
||||||
() => ActionItem(
|
() => ActionItem(
|
||||||
icon: const Icon(Icons.thumb_down_alt_outlined),
|
icon: const Icon(FontAwesomeIcons.thumbsDown),
|
||||||
selectIcon: const Icon(Icons.thumb_down),
|
selectIcon: const Icon(FontAwesomeIcons.solidThumbsDown),
|
||||||
onTap: () {},
|
onTap: () {},
|
||||||
selectStatus: videoIntroController.hasDisLike.value,
|
selectStatus: videoIntroController.hasDisLike.value,
|
||||||
text: '不喜欢',
|
text: '不喜欢',
|
||||||
|
@ -51,6 +51,7 @@ class ActionItem extends StatelessWidget {
|
|||||||
color: selectStatus
|
color: selectStatus
|
||||||
? Theme.of(context).colorScheme.primary
|
? Theme.of(context).colorScheme.primary
|
||||||
: Theme.of(context).colorScheme.outline,
|
: Theme.of(context).colorScheme.outline,
|
||||||
|
size: 20,
|
||||||
)
|
)
|
||||||
: Image.asset(
|
: Image.asset(
|
||||||
key: ValueKey<bool>(selectStatus),
|
key: ValueKey<bool>(selectStatus),
|
||||||
|
Reference in New Issue
Block a user