basic_intl 修改为 t_basic_intl

This commit is contained in:
2025-09-24 15:42:30 +08:00
parent 87cc15dd53
commit d3580a6a0b
17 changed files with 62 additions and 73 deletions

View File

@@ -65,6 +65,20 @@ class _ChatPopupState extends State<ChatPopup> with SingleTickerProviderStateMix
});
}
_openFullScreenPage() async {
final messageService = MessageService.instance;
_removeOverlay();
await Navigator.of(context).push(
MaterialPageRoute(
builder: (context) => ChangeNotifierProvider.value(
value: messageService, // 传递同一个单例实例
child: const FullScreenPage(),
),
),
);
}
@override
Widget build(BuildContext context) {
return ChangeNotifierProvider.value(
@@ -89,16 +103,17 @@ class _ChatPopupState extends State<ChatPopup> with SingleTickerProviderStateMix
Widget _buildPopupBackground() {
return Positioned.fill(
child: GestureDetector(
onTap: () {
final messageService = MessageService.instance;
_removeOverlay();
messageService.abortReply();
messageService.initializeEmpty();
},
child: SizedBox.expand()
),
);
child: GestureDetector(
onTap: () {
final messageService = MessageService.instance;
_removeOverlay();
messageService.abortReply();
messageService.initializeEmpty();
},
child: SizedBox.expand(
child: Container(
color: Colors.black45.withValues(alpha: 0.1),
))));
}
Widget _buildPopupContent(BoxConstraints constraints) {
@@ -112,6 +127,7 @@ class _ChatPopupState extends State<ChatPopup> with SingleTickerProviderStateMix
right: position.right,
bottom: position.bottom,
child: ChatWindowContent(
onCloseWindow: _removeOverlay,
animationController: _partScreenAnimationController,
minHeight: minHeight,
maxHeight: maxHeight,
@@ -131,20 +147,9 @@ class _ChatPopupState extends State<ChatPopup> with SingleTickerProviderStateMix
// 先执行外部传入的 onTap如果有
if (widget.child!.onTap != null) {
widget.child!.onTap!();
} else {
// 默认行为:关闭弹窗并打开全屏
final messageService = context.read<MessageService>();
_removeOverlay();
await Navigator.of(context).push(
MaterialPageRoute(
builder: (context) => ChangeNotifierProvider.value(
value: messageService,
child: const FullScreenPage(),
),
),
);
}
// 默认行为:关闭弹窗并打开全屏
await _openFullScreenPage();
},
onLongPress: () async {
debugPrint('⏳ FloatingIcon onLongPress triggered! (using child properties)');
@@ -195,17 +200,7 @@ class _ChatPopupState extends State<ChatPopup> with SingleTickerProviderStateMix
icon: widget.icon,
onTap: () async {
debugPrint('🖱️ FloatingIcon onTap triggered!');
final messageService = context.read<MessageService>();
_removeOverlay();
await Navigator.of(context).push(
MaterialPageRoute(
builder: (context) => ChangeNotifierProvider.value(
value: messageService, // 传递同一个单例实例
child: const FullScreenPage(),
),
),
);
await _openFullScreenPage();
},
onLongPress: () async {
debugPrint('⏳ FloatingIcon onLongPress triggered!');