其他分享
首页 > 其他分享> > Flutter 去除右上角Debug标签

Flutter 去除右上角Debug标签

作者:互联网

 

 想要去除右上角的DEBUG标签只需要在MaterialApp中加入debugShowCheckedModeBanner: false即可

 

class MyApp extends StatelessWidget {
  const MyApp({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return const MaterialApp(
      title: 'Flutter Demo',
      home: MyHomePage(title: 'Flutter Demo Home Page'),
      debugShowCheckedModeBanner: false
    );
  }
}

效果

 

标签:MaterialApp,false,key,右上角,MyApp,Debug,const,Flutter
来源: https://www.cnblogs.com/ShengLiu/p/15917285.html