feat: 修复了插件需要外部Provider的问题;加上了一个简易的车控状态返回

This commit is contained in:
2025-09-18 15:53:39 +08:00
parent 922818f39f
commit b84899ece3
16 changed files with 404 additions and 87 deletions

View File

@@ -96,9 +96,14 @@ class _FloatingIconState extends State<FloatingIcon> with TickerProviderStateMix
// 显示全屏界面
void _showFullScreen() async {
_hidePartScreen();
final messageService = context.read<MessageService>();
await Navigator.of(context).push(
MaterialPageRoute(
builder: (context) => const FullScreen(),
builder: (context) => ChangeNotifierProvider.value(
value: messageService, // 传递同一个单例实例
child: const FullScreen(),
),
),
);
}
@@ -164,7 +169,11 @@ class _FloatingIconState extends State<FloatingIcon> with TickerProviderStateMix
// }
// }
// });
return ChangeNotifierProvider(create: (_) => MessageService(), child: _buildFloatingIcon());
}
Widget _buildFloatingIcon() {
return Stack(
children: [
if (_isShowPartScreen)