简体   繁体   English

Flutter 将 SDK 升级到 2.2.1(最新稳定版)后更改了材质图标

[英]Flutter Material Icons changed after upgrading SDK to 2.2.1 (latest stable)

I just upgraded my SDK and some Material Icons changed to this ugly ones, any advice?我刚刚升级了我的 SDK 并且一些 Material Icons 变成了这个丑陋的,有什么建议吗? 在此处输入图像描述

Usually this happens when your pubspec.yaml file, under dev-dependencies has uses-material-design set to false and its not including the material icons in your app.通常,当您的 pubspec.yaml 文件在 dev-dependencies 下将uses-material-design设置为 false 并且它不包括应用程序中的材质图标时,就会发生这种情况。

Change it to true, and restart the app.将其更改为 true,然后重新启动应用程序。 It should work after that.它应该在那之后工作。

I found the issue, the material icon codes where replaced in this SDK and I was using IconData instead of referencing by their name.我发现了这个问题,在这个 SDK 中替换了材质图标代码,我使用的是 IconData 而不是通过它们的名称引用。 So I updated the code to be like:所以我将代码更新为:

Icon(Icons.arrow_back_ios_new_rounded, size: 20)

See https://github.com/flutter/flutter/issues/84427https://github.com/flutter/flutter/issues/84427

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 升级到最新的 Flutter 稳定版本后 CachedNetworkImage 抛出错误 - CachedNetworkImage throwing error after upgrading to latest Flutter Stable version 如何在flutter中将dart SDK更新到最新的稳定版本 - How to update dart SDK to latest stable version in flutter 升级到最新的 SDK 版本 1.20.4 后,运行/调试 Flutter 应用程序的速度非常慢 - Running/Debugging Flutter app very slow after upgrading to latest SDK version 1.20.4 SDK 升级后 Flutter Web 中的图标错误 - Wrong icons in Flutter Web after SDK upgrade 将Flutter升级到最新版本后,无法构建iOS项目 - Not able build iOS project after upgrading flutter to the latest version 将颤振升级到最新版本后,我的 Apk 大小变大了 - My Apk size getting much large after upgrading flutter to latest flutter 清理并升级到最新版本后不断出现错误 - Keep getting errors after flutter clean and upgrading to latest version 使用 Firebase 构建的最新稳定 Flutter 是什么? - What is the latest stable Flutter build to be using Firebase? Flutter SDK 在 MacOS 之后在 Windows 上运行应用程序后路径发生变化 - Flutter SDK path changed after running the app on Windows after MacOS 错误的图标 flutter android 材质 - wrong icons flutter android material
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM