当前位置:网站首页>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
边栏推荐
- arcgis js api dojoConfig配置
- Download xshell 6 and xftp6 official websites
- 2022.04.23(LC_763_划分字母区间)
- Druid SQL和Security在美团点评的实践
- ESP32 LVGL8. 1 - msgbox message box (msgbox 28)
- : app: transformclasseswithrobustfordevrease meituan hot repair compilation error record
- 网络协议之:sctp流控制传输协议
- The corresponding permissions required to automatically open the app in the setting interface through accessibility service
- Disable Ctrl + Alt + Del
- Solve the problem of invalid listview Click
猜你喜欢
Raspberry pie 18b20 temperature
After opening the original normal project, the dependency package displays red and does not exist.
FTP, SSH Remote Access and control
Client interns of a large factory share their experience face to face
MySQL restores or rolls back data through binlog
mysql通过binlog恢复或回滚数据
Some records used by VS2010
Using Visual Studio code to develop Arduino
2022.04.23(LC_763_划分字母区间)
SQL常用的命令
随机推荐
Simplified path (force buckle 71)
Using 8266 as serial port debugging tool
7、 DOM (Part 2) - chapter after class exercises and answers
MySQL statement
C1000k TCP connection upper limit test
arcMap 发布切片服务
Partage de la conception de l'alimentation électrique de commutation et illustration des compétences en conception de l'alimentation électrique
The difference between ordinary inner class and static inner class
Tencent cloud GPU best practices - remote development training using jupyter pycharm
The type initializer for ‘Gdip‘ threw an exception
开关电源设计分享及电源设计技巧图解
【历史上的今天】4 月 23 日:YouTube 上传第一个视频;网易云音乐正式上线;数字音频播放器的发明者出生
One stop service platform for high-level talents and development of comprehensive service platform system for talents
binlog2sql 工具安装使用及问题汇总
On the forced conversion of C language pointer
[today in history] April 23: the first video uploaded on YouTube; Netease cloud music officially launched; The inventor of digital audio player was born
redis优化系列(三)解决主从配置后的常见问题
開關電源設計分享及電源設計技巧圖解
Simple use of navigation in jetpack
Disable Ctrl + Alt + Del