Flutter的文本控件的基本使用
生活随笔
收集整理的這篇文章主要介紹了
Flutter的文本控件的基本使用
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
Flutter的文本控件的基本使用
import 'package:flutter/material.dart';void main(){runApp(MaterialApp(title: "TextDemo",home: TextDemo(),)); }class TextDemo extends StatelessWidget {@overrideWidget build(BuildContext context) {return Scaffold(appBar: AppBar(title: Text("Text文本控件"),),body: Column(children: <Widget>[Text("紅色+23號字+ 加粗",style: TextStyle(color: Colors.red,fontWeight: FontWeight.bold,letterSpacing: 6,fontSize: 23,),),Text("綠色+底部實線+24號字體",style: TextStyle(color: Colors.green,decoration: TextDecoration.underline,fontSize: 24),),Text("頂部虛線上劃線+25號字+傾斜字",style: TextStyle(fontSize: 25,fontStyle: FontStyle.italic,decoration: TextDecoration.overline,decorationStyle: TextDecorationStyle.dashed,),),Text("藍色+紅色的刪除線+27號字體",style: TextStyle(fontSize: 27,color: Colors.blue,decoration: TextDecoration.lineThrough,),)],),);} } 創作挑戰賽新人創作獎勵來咯,堅持創作打卡瓜分現金大獎總結
以上是生活随笔為你收集整理的Flutter的文本控件的基本使用的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: SwiftUI优秀文章经典案例制作简易的
- 下一篇: dart初始化项目的分析