去除右上角Debug标签

在MaterialApp初始化的时候,设置
debugShowCheckedModeBanner:false即可。

void main(){
  runApp(new MyApp());
}

class MyApp extends StatefulWidget {
  @override
  _MyAppState createState() => new _MyAppState();
}

class _MyAppState extends State {
  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return new MaterialApp(
      title: new Text('My Application'),
      debugShowCheckedModeBanner: false,  // 设置这一属性即可
      theme: new ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: new SplashScreen(),
      routes:  {
          '/splashscreen': (BuildContext context) => new SplashScreen(),
          '/conditions': (BuildContext context) => new TermsAndConditionsPage(),
        },
    );
  }
}

你可能感兴趣的:(去除右上角Debug标签)