如何删除Flutter调试标语? [英] How to remove the Flutter debug banner?

查看:128
本文介绍了如何删除Flutter调试标语?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在Flutter中删除调试横幅?

How to remove the debug banner in Flutter?

我正在使用flutter screenshot,我希望屏幕截图没有横幅.现在确实有.

I am using a flutter screenshot and I would like the screenshot not to have a banner. Now it does have.

请注意,在配置文件和发布模式下,我会收到not supported for emulator消息.

Note that I get not supported for emulator messages for profile and release mode.

推荐答案

在您的MaterialApp上,将debugShowCheckedModeBanner设置为false.

MaterialApp(
  debugShowCheckedModeBanner: false,
)

调试 标语也将在发行版本中自动删除.

The debug banner will also automatically be removed on release build.

这篇关于如何删除Flutter调试标语?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆