想知道我如何在容器中實作這一點 
return Column(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
Container(
width: width,
height: height / 3,
decoration: BoxDecoration(
border: Border.all(
color: Colors.black,
width: 3,
),
),
),
uj5u.com熱心網友回復:
檢查下面的解決方案對您有幫助。
Column(
mainAxisAlignment: MainAxisAlignment.start,
children:[
Row(children:[
Text("Name"),Spacer(),Text("Abc")
]),
Row(children:[
Text("class"),Spacer(),Text("2nd")
])
])
uj5u.com熱心網友回復:
也許這可以幫助你

Container(
width: 100,
height: 100,
decoration: BoxDecoration(
border: Border.all(
color: Colors.black,
width: 3,
),
),
child: Column(
children: [
Padding(
padding: const EdgeInsets.all(8.0),
child: Row(
children: [
Text("a"),
Spacer(flex: 1,),
Text("B")
],
),
),
Padding(
padding: const EdgeInsets.all(8.0),
child: Row(
children: [
Text("a"),
Spacer(flex: 1,),
Text("B")
],
),
),
Padding(
padding: const EdgeInsets.all(8.0),
child: Row(
children: [
Text("a"),
Spacer(flex: 1,),
Text("B")
],
),
),
],
),
);
或者
Container(
width: 100,
height: 100,
decoration: BoxDecoration(
border: Border.all(
color: Colors.black,
width: 3,
),
),
child: Column(
children: [
Padding(
padding: const EdgeInsets.all(8.0),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text("a"),
Text("B")
],
),
),
Padding(
padding: const EdgeInsets.all(8.0),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text("a"),
Text("B")
],
),
),
Padding(
padding: const EdgeInsets.all(8.0),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text("a"),
Text("B")
],
),
),
],
),
);
引數設定你根據
兩種方式
轉載請註明出處,本文鏈接:https://www.uj5u.com/qukuanlian/421002.html
標籤:
