嗨,我有這個用戶界面,我想把按鈕設定在螢屏的末端。我怎樣才能做到這一點?
這是我的代碼。這段代碼顯示了我如何設計這個用戶界面。我想知道我如何在螢屏的末端設定按鈕。 TextField in padding To be spaced with the button.我試著增加padding的值,但效果并不理想。我有其他的解決辦法嗎?
Container(
height: 高度。
width: 寬度。
孩子。SingleChildScrollView(
child: new Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
new Padding(
padding: const EdgeInsets.only( left: 15, right: 10, top: 30)。)
孩子。new InputField(
textController: receiverController,
hint: '??? ?????? ???? ?? ???? ????'/span>,
標簽。'??????',
晦澀難懂。false,
圖示。Icons.person_add_alt_1_outlined,
半徑。15,
),
),
大小盒(SizedBox)
高度。10,
),
new Padding(
padding: const EdgeInsets.only(left: 15, right: 10)。)
孩子。new InputField(
textController: subjectController,
hint: '????? ???? ?? ???? ????',
標簽。'?????'/span>,
晦澀難懂。false。
圖示。Icons.title,
半徑。15,
// suffixIcon: Icon(Icons.lock),
),
),
SizedBox(
高度。10,
),
new Padding(
padding: const EdgeInsets.only(left: 15, right: 10)。)
孩子。new InputField(
textController: textController,
// hint: '????',
標簽。' ???'。
晦澀難懂。false,
圖示。Icons.message,
半徑。15,
// suffixIcon: Icon(Icons.lock),
),
),
new Padding(
padding: const EdgeInsets.all(80) 。
孩子。new ButtonTheme(
minWidth: width * .25,
高度。50。
孩子。new RaisedButton(
onPressed: () {
this.newmessageBloc.add(new NewmessageEventSend(
receiver: receiverController.text,
subject: subjectController.text,
text: textController.text))。
},
孩子。new Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
new Text(
'?????',
風格。new TextStyle(
color: Colors.white,
fontWeight: FontWeight.bold,
字體大小。16)。)
),
圖示(
Icons.send_rounded,
color: Colors.white,
),
],
),
color: new Color(0xff333399) 。
形狀。RoundedRectangleBorder(
borderRadius: borderRadius.round(15.0)。
),
)),
)
uj5u.com熱心網友回復:
你可以在一個專欄上使用Expanded部件,然后像這樣寫你的btn:
Column(
兒童。[
展開(
孩子。容器(
child: SingleChildScrollView(
child: new Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
new Padding(
padding:
const EdgeInsets.only( left: 15, right: 10, top: 30)。)
孩子。Text("")。
),
SizedBox(
高度。10,
),
new Padding(
padding: const EdgeInsets.only(left: 15, right: 10)。)
孩子。Text("")。
),
SizedBox(
高度。10,
),
],
),
),
),
),
new Padding(
padding: const EdgeInsets.all(80) 。
孩子。new ButtonTheme(
minWidth: 25,
高度。50。
孩子。new RaisedButton(
onPressed: () {
// this.newmessageBloc.add(new NewmessageEventSend()
// receiver: receiverController.text,.
// subject: subjectController.text,/span>
//text: textController.text));。
},
孩子。new Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
new Text(
'?????',
風格。new TextStyle(
color: Colors.white,
fontWeight: FontWeight.bold,
字體大小。16)。)
),
圖示(
Icons.send_rounded,
color: Colors.white,
),
],
),
color: new Color(0xff333399) 。
形狀。RoundedRectangleBorder(
borderRadius: borderRadius.round(15.0)。
),
)),
),
],
)
對不起,我被迫洗掉了部分代碼,因為我不知道它們。
轉載請註明出處,本文鏈接:https://www.uj5u.com/net/315145.html
標籤:
