5

Flutter 删除右上角Debug标签

 1 year ago
source link: https://www.myfreax.com/flutter-deletes-the-debug-tab-in-the-upper-right-corner/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Flutter 删除右上角Debug标签

当你在Flutter应用的右上角调试布局,右上角Debug标签可能会影响你的布局调试

Updated At 27 Nov 2022 1 min read
By myfreax
Flutter 删除右上角Debug标签

Flutter 删除右上角Debug标签

Flutter是来自Google的开源框架,用于为Android、iOS、Mac、Windows和其他平台开发跨平台应用程序。

之所以有人选择这个框架,是因为它彻底改变了应用程序开发的方式。您现在可以使用一套代码构建、测试和开发出色的移动、桌面、Web和嵌入式应用程序。

本教程说明如何在Flutter删除右上角Debug标签/横幅。当你在Flutter应用的右上角调试布局,右上角Debug标签可能会影响你的布局调试。因此,你可能需要删除它。

要删除右上角Debug标签请在MaterialApp() widget部件添加或者传递命名参数 debugShowCheckModeBanner的值。

debugShowCheckModeBanner的默认值是true,也就是会展示Debug调试标签。

当设置debugShowCheckModeBanner的值为false,将会停止展示Debug调试标签,即使在Flutter调试模式。

void main() {
  runApp(MaterialApp(
    debugShowCheckedModeBanner: false,
    title: 'Demo',
    theme: ThemeData(
      primarySwatch: Colors.blue,
    ),
    home: const MessagePage(),
  ));
}

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK