关闭flutter调试时右上角的'debug'字样

image.png
class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      debugShowCheckedModeBanner:false,    // 加入这行代码,即可关闭'DEBUG'字样
      title: 'Flutter Demo',
      theme: ThemeData(
       
        
        primarySwatch: Colors.orange,
        visualDensity: VisualDensity.adaptivePlatformDensity,
      ),
      home: MyHomePage(title: 'xxx'),
    );
  }
}

你可能感兴趣的:(关闭flutter调试时右上角的'debug'字样)