mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
BIN
assets/fonts/custom_icon.ttf
Normal file
BIN
assets/fonts/custom_icon.ttf
Normal file
Binary file not shown.
29
lib/common/widgets/custom_icon.dart
Normal file
29
lib/common/widgets/custom_icon.dart
Normal file
@@ -0,0 +1,29 @@
|
||||
// ignore_for_file: constant_identifier_names
|
||||
|
||||
import 'package:flutter/widgets.dart';
|
||||
|
||||
class CustomIcon {
|
||||
static const _kFontFam = 'custom_icon';
|
||||
|
||||
static const IconData coin = IconData(0xe800, fontFamily: _kFontFam);
|
||||
static const IconData dm_off = IconData(0xe801, fontFamily: _kFontFam);
|
||||
static const IconData dm_on = IconData(0xe802, fontFamily: _kFontFam);
|
||||
static const IconData dm_settings = IconData(0xe803, fontFamily: _kFontFam);
|
||||
static const IconData dyn = IconData(0xe804, fontFamily: _kFontFam);
|
||||
static const IconData fav = IconData(0xe805, fontFamily: _kFontFam);
|
||||
static const IconData share = IconData(0xe806, fontFamily: _kFontFam);
|
||||
static const IconData share_line = IconData(0xe807, fontFamily: _kFontFam);
|
||||
static const IconData share_node = IconData(0xe808, fontFamily: _kFontFam);
|
||||
static const IconData star_favorite_line =
|
||||
IconData(0xe809, fontFamily: _kFontFam);
|
||||
static const IconData thumbs_down = IconData(0xe80a, fontFamily: _kFontFam);
|
||||
static const IconData thumbs_down_outline =
|
||||
IconData(0xe80b, fontFamily: _kFontFam);
|
||||
static const IconData thumbs_up = IconData(0xe80c, fontFamily: _kFontFam);
|
||||
static const IconData thumbs_up_line =
|
||||
IconData(0xe80d, fontFamily: _kFontFam);
|
||||
static const IconData thumbs_up_outline =
|
||||
IconData(0xe80e, fontFamily: _kFontFam);
|
||||
static const IconData topic_tag = IconData(0xe80f, fontFamily: _kFontFam);
|
||||
static const IconData watch_later = IconData(0xe810, fontFamily: _kFontFam);
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
// 内容
|
||||
import 'package:PiliPlus/common/widgets/custom_icon.dart';
|
||||
import 'package:PiliPlus/common/widgets/image/image_view.dart';
|
||||
import 'package:PiliPlus/models/dynamics/result.dart';
|
||||
import 'package:PiliPlus/pages/dynamics/widgets/rich_node_panel.dart';
|
||||
@@ -44,7 +45,7 @@ Widget content(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
if (item.modules.moduleDynamic?.topic != null) ...[
|
||||
if (item.modules.moduleDynamic?.topic != null)
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
Get.toNamed(
|
||||
@@ -55,15 +56,29 @@ Widget content(
|
||||
},
|
||||
);
|
||||
},
|
||||
child: Text(
|
||||
'#${item.modules.moduleDynamic!.topic!.name}',
|
||||
child: Text.rich(
|
||||
TextSpan(
|
||||
children: [
|
||||
WidgetSpan(
|
||||
alignment: PlaceholderAlignment.middle,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.only(right: 4),
|
||||
child: Icon(
|
||||
size: 18,
|
||||
CustomIcon.topic_tag,
|
||||
color: theme.colorScheme.primary,
|
||||
),
|
||||
),
|
||||
),
|
||||
TextSpan(text: item.modules.moduleDynamic!.topic!.name),
|
||||
],
|
||||
),
|
||||
style: TextStyle(
|
||||
fontSize: source == 'detail' && !isSave ? 16 : 15,
|
||||
color: theme.colorScheme.primary,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
if (richNodes != null)
|
||||
source == 'detail'
|
||||
? SelectableText.rich(
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
// 转发
|
||||
import 'package:PiliPlus/common/widgets/badge.dart';
|
||||
import 'package:PiliPlus/common/widgets/custom_icon.dart';
|
||||
import 'package:PiliPlus/common/widgets/image/image_save.dart';
|
||||
import 'package:PiliPlus/common/widgets/image/image_view.dart';
|
||||
import 'package:PiliPlus/common/widgets/image/network_img_layer.dart';
|
||||
@@ -92,8 +93,8 @@ Widget forWard(
|
||||
),
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 2),
|
||||
if (item.modules.moduleDynamic?.topic != null)
|
||||
const SizedBox(height: 5),
|
||||
if (item.modules.moduleDynamic?.topic != null) ...[
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
Get.toNamed(
|
||||
@@ -104,11 +105,28 @@ Widget forWard(
|
||||
},
|
||||
);
|
||||
},
|
||||
child: Text(
|
||||
'#${item.modules.moduleDynamic!.topic!.name}',
|
||||
child: Text.rich(
|
||||
TextSpan(
|
||||
children: [
|
||||
WidgetSpan(
|
||||
alignment: PlaceholderAlignment.bottom,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.only(right: 4),
|
||||
child: Icon(
|
||||
size: 18,
|
||||
CustomIcon.topic_tag,
|
||||
color: theme.colorScheme.primary,
|
||||
),
|
||||
),
|
||||
),
|
||||
TextSpan(text: item.modules.moduleDynamic!.topic!.name),
|
||||
],
|
||||
),
|
||||
style: TextStyle(color: theme.colorScheme.primary),
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 5),
|
||||
],
|
||||
if (richNodes != null)
|
||||
Text.rich(
|
||||
richNodes,
|
||||
|
||||
@@ -4,6 +4,7 @@ import 'dart:math';
|
||||
import 'dart:ui';
|
||||
|
||||
import 'package:PiliPlus/common/constants.dart';
|
||||
import 'package:PiliPlus/common/widgets/custom_icon.dart';
|
||||
import 'package:PiliPlus/common/widgets/scroll_physics.dart';
|
||||
import 'package:PiliPlus/grpc/bilibili/main/community/reply/v1.pb.dart'
|
||||
show ReplyInfo;
|
||||
@@ -56,7 +57,6 @@ import 'package:flutter/material.dart';
|
||||
import 'package:flutter/rendering.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
|
||||
import 'package:flutter_svg/svg.dart';
|
||||
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:hive/hive.dart';
|
||||
@@ -1590,18 +1590,15 @@ class _VideoDetailPageVState extends State<VideoDetailPageV>
|
||||
videoDetailController
|
||||
.plPlayerController.isOpenDanmu.value);
|
||||
},
|
||||
icon: SvgPicture.asset(
|
||||
icon: Icon(
|
||||
videoDetailController
|
||||
.plPlayerController.isOpenDanmu.value
|
||||
? 'assets/images/video/danmu_open.svg'
|
||||
: 'assets/images/video/danmu_close.svg',
|
||||
colorFilter: ColorFilter.mode(
|
||||
videoDetailController
|
||||
.plPlayerController.isOpenDanmu.value
|
||||
? themeData.colorScheme.secondary
|
||||
: themeData.colorScheme.outline,
|
||||
BlendMode.srcIn,
|
||||
),
|
||||
? CustomIcon.dm_on
|
||||
: CustomIcon.dm_off,
|
||||
color: videoDetailController
|
||||
.plPlayerController.isOpenDanmu.value
|
||||
? themeData.colorScheme.secondary
|
||||
: themeData.colorScheme.outline,
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
@@ -285,6 +285,9 @@ flutter:
|
||||
- family: digital_id_num
|
||||
fonts:
|
||||
- asset: assets/fonts/digital_id_num.ttf
|
||||
- family: custom_icon
|
||||
fonts:
|
||||
- asset: assets/fonts/custom_icon.ttf
|
||||
# - family: Jura-Bold
|
||||
# fonts:
|
||||
# - asset: assets/fonts/Jura-Bold.ttf
|
||||
|
||||
Reference in New Issue
Block a user