在我的代码中,我使用ListView进行滚动,并且只有在滚动时才能单击按钮。但是我真的需要不使用ListView就能适合任何大小屏幕的页面。
child: ListView(
children: <Widget>[
Column(
mainAxisSize: MainAxisSize.max,
mainAxisAlignment: MainAxisAlignment.spaceAround,
crossAxisAlignment: CrossAxisAlignment.stretch,
children: <Widget>[
new Text(
"Please enter the amount to withdraw from the account",
style: TextStyle(fontSize: 23),
textAlign: TextAlign.center,
),
Padding(
padding: EdgeInsets.only(top: 50.0,left: 80),
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Padding(
padding: EdgeInsets.only(top: 10.0,left: 30),
),
new Text(
"Amount",
style: TextStyle(fontSize: 16),
),
new Text(
"12,000.00",
style: TextStyle(fontSize: 20),
),
],
),
),
Padding(
padding: EdgeInsets.only(top: 230, bottom: 10.0),
child: ButtonTheme(
minWidth: double.infinity,
height: 50.0,
child: RaisedButton(
color: Colors.black,
// padding: EdgeInsets.only(top: 15.0, bottom: 15.0),
textColor: Colors.white,
child: new Text(
"Transfer Now",
style: new TextStyle(fontSize: 15),
),
onPressed: () {
setState(() {
Navigator.pushReplacement(
context, MaterialPageRoute(builder: (BuildContext context) => TransactionSPage()));
});
}),
),
)
],
),
],
),
我需要使页面适合任何尺寸的屏幕,但是现在这是一个滚动页面