flutter wrap 配 chip 可解決中文 英文 居中的問題


Wrap(
                                alignment: WrapAlignment.end,
                                spacing: 5.0,
                                runSpacing: 5.0,
                                children: everyFlagWidget,
                              )

 

碎片,一般是用作標簽
    const Chip({
    Key key,
    this.avatar,//標簽左側Widget,一般為小圖標
    @required this.label,//標簽
    this.labelStyle,
    this.labelPadding,
    this.deleteIcon,//刪除圖標
    this.onDeleted,//刪除回調,為空時不顯示刪除圖標
    this.deleteIconColor,//刪除圖標的顏
    this.deleteButtonTooltipMessage,//刪除按鈕的tip文字
    this.shape,//形狀.默認兩端是半圓形
    this.clipBehavior = Clip.none
    this.backgroundColor,//背景顏色
    this.padding,
    this.materialTapTargetSize,//設置為MaterialTapTargetSize.shrinkWrap時,clip距頂部距離為0;設置為MaterialTapTargetSize.padded時距頂部有一個距離
    })

 

----------------------------------------

若 wrap里若用 

Container(
child: Text(

假如有 2個標簽 一個里純中文 一個里純英文 則會出現這兩個Container高度不同 文字不在同一水平線的情況

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM