当前位置:网站首页>Use of fluent custom fonts and pictures
Use of fluent custom fonts and pictures
2022-04-23 19:10:00 【Little brother】
1. First put the fonts and pictures you need to use under the specified folder :
2. stay pubspec.yaml Initialize fonts and pictures under file :
# Add images assets: - assets/images/bg_swms.png - assets/images/icon.png # Add the font fonts: - family: fzktc fonts: - asset: assets/fonts/fzktc.TTF
3. After initialization , Implement... In code :
display picture
class _SplashState extends State<HomePage> { @override Widget build(BuildContext context) { return Container( width: double.infinity, height: double.infinity, color: Colors.white, child: Image.asset( "assets/images/icon.png", /// Your local pictures --local picture fit: BoxFit.fill,/// Auto fill page size --auto fill page size ), ); }
Set the font
class _MyLoginPageState extends State<Login> { @override Widget build(BuildContext context) { return Scaffold( appBar: AppBar( title: Text(' The test system '), centerTitle: true, ), body: Center( child: Text( productName, style: TextStyle(fontFamily: 'fzktc', fontSize: 30), ), ), ); } }
Just beginning to learn , Daily records .
版权声明
本文为[Little brother]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204210601422463.html
边栏推荐
- js获取本机ip地址
- Esp32 drive encoder -- siq-02fvs3 (vscade + IDF)
- redis优化系列(三)解决主从配置后的常见问题
- One stop service platform for high-level talents and development of comprehensive service platform system for talents
- OpenHarmony开源开发者成长计划,寻找改变世界的开源新生力!
- 中金财富怎么样?在上边开户安全吗
- One of the reasons why the WebView web page cannot be opened (and some WebView problem records encountered by myself)
- FTP、ssh远程访问及控制
- 开关电源设计分享及电源设计技巧图解
- Introduction to ROS learning notes (I)
猜你喜欢
从技术体系到商业洞察,中小研发团队架构实践之收尾篇
Introduction to ROS learning notes (I)
微搭低代码零基础入门课(第三课)
After opening the original normal project, the dependency package displays red and does not exist.
Eight bit binary multiplier VHDL
Openharmony open source developer growth plan, looking for new open source forces that change the world!
Esp32 (UART 485 communication) - 485 communication of serial port (3)
binlog2sql 工具安装使用及问题汇总
OpenHarmony开源开发者成长计划,寻找改变世界的开源新生力!
网络协议之:sctp流控制传输协议
随机推荐
Esp32 drive encoder -- siq-02fvs3 (vscade + IDF)
电路在线模拟
From technical system to business insight, the closing chapter of the practice of small and medium-sized R & D team structure
SSDB foundation 3
Get a list of recent apps
2022.04.23 (the best time for lc_714_to buy and sell stocks, including handling charges)
坐标转换WGS-84 转 GCJ-02 和 GCJ-02转WGS-84
Esp32 (UART 485 communication) - 485 communication of serial port (3)
JS calculation time difference
FTP, SSH Remote Access and control
Convert string to JSON
Openlayers draw rectangle
Sword finger offer II 116 Number of provinces - spatial complexity O (n), time complexity O (n)
Simplified path (force buckle 71)
c#:泛型反射
[报告] Microsoft :Application of deep learning methods in speech enhancement
mysql_linux版本的下載及安裝詳解
MySQL学习第五弹——事务及其操作特性详解
Screen right-click menu in souI
腾讯云GPU最佳实践-使用jupyter pycharm远程开发训练