当前位置:网站首页>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
边栏推荐
- 2022.04.23 (the best time for lc_714_to buy and sell stocks, including handling charges)
- Esp32 (UART 485 communication) - 485 communication of serial port (3)
- Methods of nested recycleview to solve sliding conflict and incomplete item display
- Network protocol: SCTP flow control transmission protocol
- Solve the problem of invalid listview Click
- Tencent cloud GPU best practices - remote development training using jupyter pycharm
- c#:泛型反射
- SSDB基础
- ArcGIS JS API dojoconfig configuration
- Coolweather is revised and connected to the wind weather interface to realize the broken line diagram of temperature
猜你喜欢
![[today in history] April 23: the first video uploaded on YouTube; Netease cloud music officially launched; The inventor of digital audio player was born](/img/0a/ed4eab6589e1c072edc247463e889e.png)
[today in history] April 23: the first video uploaded on YouTube; Netease cloud music officially launched; The inventor of digital audio player was born

MVVM model

mysql通过binlog恢复或回滚数据

Raspberry pie 18b20 temperature

mysql_ Download and installation of Linux version

MySQL restores or rolls back data through binlog

mysql_linux版本的下载及安装详解

Druid SQL和Security在美团点评的实践

Class loading process of JVM

Partage de la conception de l'alimentation électrique de commutation et illustration des compétences en conception de l'alimentation électrique
随机推荐
: app: transformclasseswithrobustfordevrease meituan hot repair compilation error record
从技术体系到商业洞察,中小研发团队架构实践之收尾篇
Customize the non slidable viewpage and how to use it
【玩转Lighthouse】腾讯云轻量服务器搭建全平台视频解析视频下载网站
MySQL restores or rolls back data through binlog
SSDB foundation 1
The fifth bullet of MySQL learning -- detailed explanation of transaction and its operation characteristics
SSDB基础2
mysql通过binlog恢复或回滚数据
Sword finger offer II 116 Number of provinces - spatial complexity O (n), time complexity O (n)
在渤海期货办理开户安全吗。
2022.04.23(LC_714_买卖股票的最佳时机含手续费)
Accessing private members using templates
Openlayers draw rectangle
RPM包管理
mysql_ Download and installation of Linux version
Partage de la conception de l'alimentation électrique de commutation et illustration des compétences en conception de l'alimentation électrique
js 计算时间差
openlayers 5.0 热力图
坐标转换WGS-84 转 GCJ-02 和 GCJ-02转WGS-84