mod: lint

mod: tweaks

opt: publish page

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-05-04 11:37:13 +08:00
parent 2cfad80214
commit caa58e9d7d
313 changed files with 2751 additions and 2789 deletions

View File

@@ -17,7 +17,7 @@ import 'package:PiliPlus/common/widgets/image/network_img_layer.dart';
import 'package:PiliPlus/pages/whisper_detail/controller.dart';
import 'package:PiliPlus/utils/feed_back.dart';
import 'package:image_picker/image_picker.dart';
import 'widget/chat_item.dart';
import 'package:PiliPlus/pages/whisper_detail/widget/chat_item.dart';
class WhisperDetailPage extends CommonPublishPage {
const WhisperDetailPage({
@@ -197,7 +197,7 @@ class _WhisperDetailPageState
padding: const EdgeInsets.symmetric(vertical: 8),
decoration: BoxDecoration(
color: theme.colorScheme.onInverseSurface,
borderRadius: BorderRadius.only(
borderRadius: const BorderRadius.only(
topLeft: Radius.circular(16),
topRight: Radius.circular(16),
),
@@ -244,9 +244,9 @@ class _WhisperDetailPageState
filled: true,
hintText: '发个消息聊聊呗~',
fillColor: theme.colorScheme.surface,
border: OutlineInputBorder(
border: const OutlineInputBorder(
borderSide: BorderSide.none,
borderRadius: BorderRadius.circular(6),
borderRadius: BorderRadius.all(Radius.circular(6)),
gapPadding: 0,
),
contentPadding: const EdgeInsets.all(10),
@@ -319,10 +319,7 @@ class _WhisperDetailPageState
}
@override
Widget? customPanel(double height) => SizedBox(
height: height,
child: EmotePanel(onChoose: onChooseEmote),
);
Widget? get customPanel => EmotePanel(onChoose: onChooseEmote);
@override
Future onCustomPublish({required String message, List? pictures}) {

View File

@@ -19,17 +19,17 @@ enum MsgType {
audio(value: 3, label: "语音消息"),
share(value: 4, label: "分享消息"),
revoke(value: 5, label: "撤回消息"),
custom_face(value: 6, label: "自定义表情"),
share_v2(value: 7, label: "分享v2消息"),
sys_cancel(value: 8, label: "系统撤销"),
mini_program(value: 9, label: "小程序"),
notify_msg(value: 10, label: "业务通知"),
archive_card(value: 11, label: "投稿卡片"),
article_card(value: 12, label: "专栏卡片"),
pic_card(value: 13, label: "图片卡片"),
common_share(value: 14, label: "异形卡片"),
auto_reply_push(value: 16, label: "自动回复推送"),
notify_text(value: 18, label: "文本提示");
customFace(value: 6, label: "自定义表情"),
shareV2(value: 7, label: "分享v2消息"),
sysCancel(value: 8, label: "系统撤销"),
miniProgram(value: 9, label: "小程序"),
notifyMsg(value: 10, label: "业务通知"),
archiveCard(value: 11, label: "投稿卡片"),
articleCard(value: 12, label: "专栏卡片"),
picCard(value: 13, label: "图片卡片"),
commonShare(value: 14, label: "异形卡片"),
autoReplyPush(value: 16, label: "自动回复推送"),
notifyText(value: 18, label: "文本提示");
final int value;
final String label;
@@ -62,10 +62,10 @@ class ChatItem extends StatelessWidget {
// bool isArticle = item.msgType == 12; // 专栏
bool isRevoke = item.msgType == MsgType.revoke.value; // 撤回消息
// bool isShareV2 = item.msgType == MsgType.share_v2.value;
bool isSystem = item.msgType == MsgType.notify_text.value ||
item.msgType == MsgType.notify_msg.value ||
item.msgType == MsgType.pic_card.value ||
item.msgType == MsgType.auto_reply_push.value;
bool isSystem = item.msgType == MsgType.notifyText.value ||
item.msgType == MsgType.notifyMsg.value ||
item.msgType == MsgType.picCard.value ||
item.msgType == MsgType.autoReplyPush.value;
dynamic content = item.content ?? '';
final ThemeData theme = Theme.of(context);
Color textColor() {
@@ -144,11 +144,11 @@ class ChatItem extends StatelessWidget {
Widget messageContent(BuildContext context) {
switch (MsgType.parse(item.msgType!)) {
case MsgType.notify_msg:
case MsgType.notifyMsg:
return systemNotice(theme);
case MsgType.pic_card:
case MsgType.picCard:
return systemNotice2();
case MsgType.notify_text:
case MsgType.notifyText:
return Text(
jsonDecode(content['content'])
.map((m) => m['text'] as String)
@@ -180,7 +180,7 @@ class ChatItem extends StatelessWidget {
),
),
);
case MsgType.share_v2:
case MsgType.shareV2:
String? type;
GestureTapCallback onTap;
switch (content['source']) {
@@ -302,7 +302,7 @@ class ChatItem extends StatelessWidget {
],
],
);
case MsgType.archive_card:
case MsgType.archiveCard:
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
@@ -354,7 +354,7 @@ class ChatItem extends StatelessWidget {
),
],
);
case MsgType.auto_reply_push:
case MsgType.autoReplyPush:
return Container(
constraints: const BoxConstraints(
maxWidth: 300.0, // 设置最大宽度为200.0
@@ -460,7 +460,7 @@ class ChatItem extends StatelessWidget {
],
],
));
case MsgType.article_card:
case MsgType.articleCard:
return GestureDetector(
onTap: () async {
Get.toNamed(
@@ -509,7 +509,7 @@ class ChatItem extends StatelessWidget {
],
),
);
case MsgType.common_share:
case MsgType.commonShare:
if (content['source'] == '直播') {
return Column(
crossAxisAlignment: CrossAxisAlignment.start,