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
    );
  }
}

效果

 

posted @ 2022-02-21 03:38  小白冲冲  阅读(280)  评论(0编辑  收藏  举报