Android 带颤振的溢流问题
对不起我的英语,我是法国人 我为我的用户创建了一个页面,但问题是当手机太小的时候。我有溢出的问题;我想要一个滚动页面,但是使用小部件SingleChildScrollView,我的小部件的高度有问题,无法正常工作Android 带颤振的溢流问题,android,flutter,Android,Flutter,对不起我的英语,我是法国人 我为我的用户创建了一个页面,但问题是当手机太小的时候。我有溢出的问题;我想要一个滚动页面,但是使用小部件SingleChildScrollView,我的小部件的高度有问题,无法正常工作 return Scaffold( resizeToAvoidBottomInset: false, body: Container( width: double.infinity, decoration: BoxDecorat
return Scaffold(
resizeToAvoidBottomInset: false,
body: Container(
width: double.infinity,
decoration: BoxDecoration(
gradient: LinearGradient(
colors: [
Colors.blue[900],
Colors.blue[800],
Colors.blue[400],
],
begin: Alignment.topCenter
)
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
SizedBox(height: 80,),
Padding(
padding: EdgeInsets.all(20),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
FadeAnimation(1.3, Text(
"New user",
style: TextStyle(
color: Colors.white,
fontSize: 40,
),
),
),
FadeAnimation(1, Text(
"Welcome to OCiné",
style: TextStyle(
color: Colors.white,
fontSize: 18,
),
))
],
)
),
SizedBox(height: 15,),
Expanded(
child: Container(
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.only(topLeft: Radius.circular(60), topRight: Radius.circular(60))
),
child: Padding(
padding: EdgeInsets.all(30),
child: Column(
children: <Widget>[
SizedBox(height: 20,),
FadeAnimation(1.4, Container(
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(10),
boxShadow: [BoxShadow(
color: Color.fromRGBO(33, 150, 243, .3),
blurRadius: 20,
offset: Offset(0, 10),
)],
),
child: Column(
children: <Widget>[
Container(
padding: EdgeInsets.all(10),
decoration: BoxDecoration(
border: Border(bottom: BorderSide(color: Colors.grey[300]))
),
child: TextField(
//controller: _emailController,
decoration: InputDecoration(
hintText: "Enter firstname",
hintStyle: TextStyle(
color: Colors.grey
),
border: InputBorder.none
),
),
),
Container(
padding: EdgeInsets.all(10),
decoration: BoxDecoration(
border: Border(bottom: BorderSide(color: Colors.grey[300]))
),
child: TextField(
//controller: _emailController,
decoration: InputDecoration(
hintText: "Enter lastname",
hintStyle: TextStyle(
color: Colors.grey
),
border: InputBorder.none
),
),
),
Container(
padding: EdgeInsets.all(10),
decoration: BoxDecoration(
border: Border(bottom: BorderSide(color: Colors.grey[300]))
),
child: TextField(
//controller: _emailController,
decoration: InputDecoration(
hintText: "Enter email",
hintStyle: TextStyle(
color: Colors.grey
),
border: InputBorder.none
),
),
),
Container(
padding: EdgeInsets.all(10),
decoration: BoxDecoration(
border: Border(bottom: BorderSide(color: Colors.grey[300]))
),
child: TextField(
obscureText: true,
//controller: _passwordController,
decoration: InputDecoration(
hintText: "Enter password",
hintStyle: TextStyle(
color: Colors.grey
),
border: InputBorder.none
),
),
),
Container(
padding: EdgeInsets.all(10),
decoration: BoxDecoration(
border: Border(bottom: BorderSide(color: Colors.grey[300]))
),
child: TextField(
maxLength: 20,
//controller: _passwordController,
decoration: InputDecoration(
hintText: "Enter username",
hintStyle: TextStyle(
color: Colors.grey
),
border: InputBorder.none
),
),
),
],
),
)),
SizedBox(height: 20,),
FadeAnimation(1.5, InkWell(
onTap: (){
Navigator.push(context, MaterialPageRoute(
builder: (context){
return LoginPage();
}
));
},
child: Text("Already an account ?", style: TextStyle(color: Colors.grey)),
)),
SizedBox(height: 20,),
FadeAnimation(1.6, InkWell(
onTap: () async{
//AuthProvider().createUser();
},
child: Container(
height: 50,
margin: EdgeInsets.symmetric(horizontal: 50),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(50),
color: Colors.blue[900],
),
child: Center(
child: Text("Create User", style: TextStyle(color: Colors.white, fontWeight: FontWeight.bold))
),
),
)),
],
),
),
),
)
],
),
),
);
}
}
返回脚手架(
resizeToAvoidBottomInset:false,
主体:容器(
宽度:double.infinity,
装饰:盒子装饰(
梯度:线性梯度(
颜色:[
颜色。蓝色[900],
颜色。蓝色[800],
颜色。蓝色[400],
],
开始:Alignment.topCenter
)
),
子:列(
crossAxisAlignment:crossAxisAlignment.start,
儿童:[
尺寸箱(高度:80,),
填充物(
填充:边缘设置。全部(20),
子:列(
crossAxisAlignment:crossAxisAlignment.start,
儿童:[
FadeAnimation(1.3,文本(
“新用户”,
样式:TextStyle(
颜色:颜色,白色,
尺寸:40,
),
),
),
FadeAnimation(1,文本)(
“欢迎来到奥辛”,
样式:TextStyle(
颜色:颜色,白色,
尺码:18,
),
))
],
)
),
尺寸箱(高度:15,),
扩大(
子:容器(
装饰:盒子装饰(
颜色:颜色,白色,
borderRadius:borderRadius.仅限(左上角:半径.圆形(60),右上角:半径.圆形(60))
),
孩子:填充(
填充:所有(30),
子:列(
儿童:[
尺寸箱(高度:20,),
FadeAnimation(1.4,容器(
装饰:盒子装饰(
颜色:颜色,白色,
边界半径:边界半径。圆形(10),
boxShadow:[boxShadow(
颜色:颜色。来自RGBO(33150243,.3),
半径:20,
偏移量:偏移量(0,10),
)],
),
子:列(
儿童:[
容器(
填充:边缘设置。全部(10),
装饰:盒子装饰(
边框:边框(底部:BorderSide(颜色:Colors.grey[300]))
),
孩子:TextField(
//控制器:\u电子邮件控制器,
装饰:输入装饰(
hintText:“输入名字”,
hintStyle:TextStyle(
颜色:颜色。灰色
),
边框:InputBorder.none
),
),
),
容器(
填充:边缘设置。全部(10),
装饰:盒子装饰(
边框:边框(底部:BorderSide(颜色:Colors.grey[300]))
),
孩子:TextField(
//控制器:\u电子邮件控制器,
装饰:输入装饰(
hintText:“输入姓氏”,
hintStyle:TextStyle(
颜色:颜色。灰色
),
边框:InputBorder.none
),
),
),
容器(
填充:边缘设置。全部(10),
装饰:盒子装饰(
边框:边框(底部:BorderSide(颜色:Colors.grey[300]))
),
孩子:TextField(
//控制器:\u电子邮件控制器,
装饰:输入装饰(
hintText:“输入电子邮件”,
hintStyle:TextStyle(
颜色:颜色。灰色
),
边框:InputBorder.none
),
),
),
容器(
填充:边缘设置。全部(10),
装饰:盒子装饰(
边框:边框(底部:BorderSide(颜色:Colors.grey[300]))
),
孩子:TextField(
蒙昧文字:对,
//控制器:_passwordController,
装饰:输入装饰(
hintText:“输入密码”,
hintStyle:TextStyle(
颜色:颜色。灰色
),
边框:InputBorder.none
),
),
),
容器(