【发布时间】:2021-02-20 00:33:01
【问题描述】:
我想实现以下文本框,但我被卡住了。我已经添加了带有嵌入文本的边框,但我无法在有边框的框中添加多个文本字段,例如屏幕截图。请帮忙。 this is what I want to achieve
【问题讨论】:
-
显示你迄今为止尝试过的...
标签: flutter flutter-layout flutter-animation flutter-design
我想实现以下文本框,但我被卡住了。我已经添加了带有嵌入文本的边框,但我无法在有边框的框中添加多个文本字段,例如屏幕截图。请帮忙。 this is what I want to achieve
【问题讨论】:
标签: flutter flutter-layout flutter-animation flutter-design
展示你已经尝试过的东西?
对于文本,您可以使用TextSpan
块引用
【讨论】:
试试这个!
Stack( children: [
Padding(
padding: const EdgeInsets.only(top: 10),
child: Container(height: 180, child: Padding(
padding: const EdgeInsets.only(top: 35,left: 15),
child: Column(children: [
Row(children: [
Text("Full Name:",style: TextStyle(fontSize: 16, fontWeight: FontWeight.bold),)
, Text("Mark"),
],),
SizedBox(height: 15,),
Row(children: [
Text("Email:",style: TextStyle(fontWeight: FontWeight.bold),)
, Text("email@gmail.com"),
],),
SizedBox(height: 15,),
Row(children: [
Text("Phone:",style: TextStyle(fontWeight: FontWeight.bold),)
, Text("036526494"),
],),
SizedBox(height: 15,),
Row(children: [
Text("Address:",style: TextStyle(fontWeight: FontWeight.bold),)
, Text("Random Address,city,Country"),
],),
],),
),
width: MediaQuery.of(context).size.width,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(8),
border: Border.all(width: 1)),
),
),
Padding(
padding: const EdgeInsets.only(left: 20),
child: Container(
color: Colors.white,
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 10),
child: Text(
"Contact Info",
style: TextStyle(
fontWeight: FontWeight.bold, fontSize: 18),
),
)),
),
],
)
【讨论】: