app整体设置成灰色 flutter

昨天是哀悼日,很多app都设置成了灰色,很是为大家同舟共济的精神所感动。闲暇之余,想着自己开发的app也应该能和大家的一样,在特殊的日子里能表达对英雄的致敬, 道不尽千言万语,终是汇成一句:感恩有你!

如下是代码:

 @override
  Widget build(BuildContext context) {
    initListener();
    return ColorFiltered(
      colorFilter: ColorFilter.mode(Colors.grey, BlendMode.color),
      child: MaterialApp(
        locale: _locale,
        localizationsDelegates: [
          GlobalMaterialLocalizations.delegate,
          GlobalWidgetsLocalizations.delegate,
          CustomLocalizationsDelegate.delegate,

          ///对话框dialog显示问题
          const FallbackCupertinoLocalisationsDelegate()
        ],
        routes: pagerouters,
        supportedLocales: [
          Locale("en", "US"),
          Locale("zh", "CN"),
          Locale("tr", "TR"),
        ],
        theme: _theme,
      ),
    );
  }

 

你可能感兴趣的:(flutter)