簡體   English   中英

如何在 flutter 中的頂部邊框線之間添加文本

[英]How to have text between a top border line in flutter

我怎樣才能用 flutter 做這樣的事情

截屏

您可以使用展開的行和它們之間的文本

Row(
 children: [
 Expanded(
   child : Container(
     height: 2,
     color: Colors.black
   )
 ),
 Text('some text here'),
 Expanded(
   child : Container(
     height: 2,
     color: Colors.black
   )
 ),
]
)

使用RowFlexibleDividerText小部件來實現這一點

Row(
  children: [
    Flexible(child : Divider(color: Colors.black, thickness: 0.5,)),
    Text(' Or Continue with '),
    Flexible(child : Divider(color: Colors.black, thickness: 0.5,)),
  ]
),

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM