当前位置:网站首页>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
边栏推荐
- SSDB foundation 3
- Esp32 (UART 485 communication) - 485 communication of serial port (3)
- 剑指 Offer II 116. 省份数量-空间复杂度O(n),时间复杂度O(n)
- Get a list of recent apps
- Zlib realizes streaming decompression
- JS controls the file type and size when uploading files
- SSDB Foundation
- One stop service platform for high-level talents and development of comprehensive service platform system for talents
- Solutions such as unknown or garbled code or certificate problem prompt in Charles's mobile phone packet capture, actual measurement.
- c1000k TCP 连接上限测试1
猜你喜欢

【历史上的今天】4 月 23 日:YouTube 上传第一个视频;网易云音乐正式上线;数字音频播放器的发明者出生

Introduction to ROS learning notes (II)

Switching power supply design sharing and power supply design skills diagram
![[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

Introduction to micro build low code zero Foundation (lesson 3)

微搭低代码零基础入门课(第三课)

On the forced conversion of C language pointer

简化路径(力扣71)

MVVM model

Simplified path (force buckle 71)
随机推荐
Android Development: the client obtains the latest value in the database in real time and displays it on the interface
Scrollto and scrollby
Use of content provider
An 8266 crash
JVM的类加载过程
openlayers 5.0 热力图
Using bafayun to control the computer
Go language GUI framework Fyne Chinese garbled or not displayed
RPM package management
C1000k TCP connection upper limit test
Openlayers draw rectangle
SQL server requires to query the information of all employees with surname 'Wang'
[record] typeerror: this getOptions is not a function
FTP、ssh远程访问及控制
ESP32 LVGL8. 1 - msgbox message box (msgbox 28)
Solve the problem of invalid listview Click
Oracle配置st_geometry
Fundamentals of machine learning theory -- some terms about machine learning
Druid SQL和Security在美团点评的实践
One of the reasons why the WebView web page cannot be opened (and some WebView problem records encountered by myself)