我希望它具有响应性,无论我的文本是什么,容器的边框都应该固定。
我希望它具有响应性,无论我的文本是什么,容器的边框都应该固定。
我希望它具有响应性,无论我的文本是什么,容器的边框都应该固定。
但它正在像这样发生在我身上。
这是我的容器部分代码。
Container(
padding: EdgeInsets.symmetric(horizontal: 27, vertical: 22),
width: MediaQuery.of(context).size.width,
height: MediaQuery.of(context).size.height / 4,
decoration: BoxDecoration(color: whitetext, boxShadow: [
BoxShadow(
offset: Offset(0, 3),
blurRadius: 9,
spreadRadius: 4,
color: grey,
)
]),
child: Column(
children: [
Row(
children: [
Container(
padding: EdgeInsets.symmetric(
horizontal: 22, vertical: 10),
decoration: BoxDecoration(
border: Border(
right: BorderSide(
color: grey,
width: 1.0,
),
bottom: BorderSide(
color: grey,
width: 1.0,
),
)),
child: Column(
children: [
Text(
'Rajan Sonavane',
style: titleBold()
.copyWith(fontWeight: FontWeight.w600),
),
Text('Gram Sevak', style: listGreenText())
],
),
),
Container(
padding: EdgeInsets.symmetric(
horizontal: 22, vertical: 10),
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
color: grey,
width: 1.0,
),
)),
child: Column(
children: [
Text(
'Amita Sontakke',
style: titleBold()
.copyWith(fontWeight: FontWeight.w600),
),
Text('Police Patil', style: listGreenText())
],
),
),
],
),
Row(
children: [
Container(
padding: EdgeInsets.symmetric(
horizontal: 22, vertical: 10),
decoration: BoxDecoration(
border: Border(
right: BorderSide(
color: grey,
width: 1.0,
),
)),
child: Column(
children: [
Text(
'Kailas Sawant',
style: titleBold()
.copyWith(fontWeight: FontWeight.w600),
),
Text('Clerk', style: listGreenText())
],
),
),
Container(
padding: EdgeInsets.symmetric(
horizontal: 22, vertical: 10),
decoration: BoxDecoration(),
child: Column(
children: [
Text(
'Baliram Lokare',
style: titleBold()
.copyWith(fontWeight: FontWeight.w600),
),
Text('Clerk', style: listGreenText())
],
),
),
],
)
],
),
),
请帮助我,我不知道如何做到。
尝试Container
用一个包裹你的 Rows的孩子Expanded
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句