feat: 修复了插件需要外部Provider的问题;加上了一个简易的车控状态返回
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user