

Flutter开发Linux程序中文乱码解决
source link: https://blog.lacia.cn/2020/12/08/Flutter%E5%BC%80%E5%8F%91Linux%E7%A8%8B%E5%BA%8F%E4%B8%AD%E6%96%87%E4%B9%B1%E7%A0%81%E8%A7%A3%E5%86%B3/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Flutter开发Linux程序中文乱码解决
盲猜由于字体缺失导致乱码,于是我把字体加过去
下载微软雅黑字体,也可以直接从 Windows 里复制一个
pubspec.yaml 配置
flutter:
fonts:
- family: cn
fonts:
- asset: fonts/msyh.ttc
main.dart 配置
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
debugShowCheckedModeBanner: false,
theme: ThemeData(
primarySwatch: Colors.blue,
// 配置字体
fontFamily: 'cn'
),
home: HomePage(),
);
}
}
Recommend
-
75
在Windows系统中进入"C:\Windows\Fonts"中找到"常规楷体",通过传输软件上传到zabbixserver服务器"/usr/share/zabbix/fonts"目录中。修改php页面指定的字体文件:vi/usr/share/zabbix/include/defines.inc.php修改define('ZBX_
-
53
由于安装英文版的系统不支持中文,出现中文文件名乱码。下面操作时在centos上安装中文支持。 1)先下载并安装两个语言包: fonts-chinese-3.02-12.el5.noarch.rpm fonts-ISO88...
-
17
解决命令行中 Git 显示中文文件名乱码 2020-02-10 2020-12-10工具 ,
-
18
Tip: 解决blender中文乱码问题康托耶夫虚拟现实从业/还是搞搞游戏的我是康托
-
14
Mysql数据库解决中文乱码问题【不修改my.ini配置文件】
-
4
炎忍的博客解决 VS Code 编译 C/C++ 是输出中文乱码的问题发表于2020-04-08|更新于2020-12-14|技术记录
-
6
使用LibreOffice将word转化为pdf -解决中文乱码 hulu · 4天之前 · 183 次点击 · 预计阅读时间 1 分钟...
-
12
分割GBK中文遭遇乱码的解决 -- PHP -- IT技术博客大学习 -- 共学习 共进步! 您现在的位置:首页 -->
-
14
一、什么是secureCRT? secureCRT是一款终端软件,像windows中的xShell软件一样, 在 macbook 上基本可以取代系统自带的终端工具,这个软件也有windows版本。 我的电脑是ma...
-
15
Mac下使用SecureCRT时中文乱码问题解决 ...
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK