[英]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
)
),
]
)
使用Row
、 Flexible
、 Divider
和Text
小部件來實現這一點
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.