当前位置:网站首页>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
边栏推荐
- Switching power supply design sharing and power supply design skills diagram
- SQL Server database in clause and exists clause conversion
- MySQL statement
- Introduction to ROS learning notes (I)
- 【玩转Lighthouse】腾讯云轻量服务器搭建全平台视频解析视频下载网站
- The difference between ordinary inner class and static inner class
- openlayers 5.0 离散聚合点
- JS calculation time difference
- 中金财富怎么样?在上边开户安全吗
- mysql_ Download and installation of Linux version
猜你喜欢
【C语言进阶11——字符和字符串函数及其模拟实现(2))】
12 examples to consolidate promise Foundation
Simplified path (force buckle 71)
Using Visual Studio code to develop Arduino
OpenHarmony开源开发者成长计划,寻找改变世界的开源新生力!
开关电源设计分享及电源设计技巧图解
From technical system to business insight, the closing chapter of the practice of small and medium-sized R & D team structure
The difference between ordinary inner class and static inner class
FTP, SSH Remote Access and control
After opening the original normal project, the dependency package displays red and does not exist.
随机推荐
Regular expressions for judging positive integers
Simplified path (force buckle 71)
The fifth bullet of MySQL learning -- detailed explanation of transaction and its operation characteristics
Coolweather is revised and connected to the wind weather interface to realize the broken line diagram of temperature
Disable Ctrl + Alt + Del
Get a list of recent apps
Screen right-click menu in souI
Some records used by VS2010
Tencent map and high logo removal method
[play with lighthouse] Tencent cloud lightweight server builds a full platform video analysis video download website
Convert string to JSON
MySQL restores or rolls back data through binlog
openlayers 5.0 离散聚合点
中金财富怎么样?在上边开户安全吗
Druid SQL和Security在美团点评的实践
Solve the problem of invalid listview Click
The type initializer for ‘Gdip‘ threw an exception
Wechat video extraction and receiving file path
Is it safe to open an account in Bohai futures.
在渤海期货办理开户安全吗。