Flutter 颤栗:屏幕的底部没有出现在android的apk版本和ios的临时版本中
当我从android studio运行我的应用程序时,我的屏幕呈现良好。 但是,当我创建并安装apk或为ios创建临时构建时,我的屏幕呈现如下: 正如您看到的文本字段和下面的按钮不会显示。我不明白出了什么问题。你能帮忙吗 这是屏幕的代码:Flutter 颤栗:屏幕的底部没有出现在android的apk版本和ios的临时版本中,flutter,Flutter,当我从android studio运行我的应用程序时,我的屏幕呈现良好。 但是,当我创建并安装apk或为ios创建临时构建时,我的屏幕呈现如下: 正如您看到的文本字段和下面的按钮不会显示。我不明白出了什么问题。你能帮忙吗 这是屏幕的代码: var child = Stack( children: <Widget>[ Column( mainAxisSize: MainAxisSize.max, crossAxis
var child = Stack(
children: <Widget>[
Column(
mainAxisSize: MainAxisSize.max,
crossAxisAlignment: CrossAxisAlignment.stretch,
children: <Widget>[
Expanded(
//flex: 90,
child: Image.asset(
"${Constants.imagesPath}login-cover-bg.png",
fit: BoxFit.cover,
),
),
Expanded(
//flex: 100,
child: Container(
child: ListView(
children: <Widget>[
Container(
padding: EdgeInsets.only(top: 50, left: 25),
child: Text(
'Please sign in',
style: TextStyle(
fontWeight: FontWeight.w500,
fontSize: 22,
),
),
),
SizedBox(
height: 40,
),
Expanded(
flex: 1,
child: Container(
color: Colors.orange,
padding: EdgeInsets.only(left: 25, bottom: 15, right: 25),
child: TextField(
maxLines: 1,
keyboardType: TextInputType.emailAddress,
onSubmitted: (_) {
_checkEmailValid();
FocusScope.of(context).nextFocus();
},
textInputAction: TextInputAction.next,
controller: _emailController,
decoration: InputDecoration(
enabledBorder: UnderlineInputBorder(
borderSide: BorderSide(color: disableRedColor),
// when the TextFormField in unfocused
),
focusedBorder: UnderlineInputBorder(
borderSide: BorderSide(color: themeRedColor),
// when the TextFormField in focused
),
border: UnderlineInputBorder(),
hintText: 'Email',
errorText: isEmailValid == true ? '' : 'Invalid email'
),
),
),
),
Expanded(
flex: 2,
child: Container(
color: Colors.yellow,
padding: EdgeInsets.only(left: 25, right: 25),
child: TextField(
maxLines: 1,
onSubmitted: (_) {
_checkPasswordValid();
FocusScope.of(context).unfocus();
},
keyboardType: TextInputType.text,
textInputAction: TextInputAction.done,
controller: _passwordController,
decoration: InputDecoration(
enabledBorder: UnderlineInputBorder(
borderSide: BorderSide(color: disableRedColor),
// when the TextFormField in unfocused
),
focusedBorder: UnderlineInputBorder(
borderSide: BorderSide(color: themeRedColor),
// when the TextFormField in focused
),
border: UnderlineInputBorder(),
hintText: 'Password',
errorText: isPasswordValid == true ? '' : 'Invalid password',
suffixIcon: IconButton(
icon: Icon(
shouldObscureText == false ? Icons.visibility : Icons.visibility_off,
color: themeRedColor,
),
onPressed: (){
setState(() {
shouldObscureText = !shouldObscureText;
});
},
)
),
obscureText: shouldObscureText,
),
),
),
SizedBox(
height: 65,
),
Expanded(
flex: 1,
child: GestureDetector(
onTap: () {
Util.navigateView(context, SignupScreen());
},
child: Container(
padding: EdgeInsets.only(left: 25, right: 25),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
Text(
'Forgot Password?',
style: TextStyle(
fontWeight: FontWeight.w500,
fontSize: 15,
color: Colors.black54),
),
Text(
'Sign up',
style: TextStyle(
fontWeight: FontWeight.w500,
fontSize: 15,
color: Colors.black54),
),
],
),
),
)),
],
),
color: Colors.white,
),
),
],
),
Padding(
padding: const EdgeInsets.all(16.0),
child: Container(
width: 200,
child: Text(
'Welcome Back',
maxLines: 2,
style: TextStyle(
color: Colors.white,
fontSize: 35,
fontWeight: FontWeight.bold,
),
),
),
),
Align(
alignment: Alignment.centerRight,
child: InkWell(
onTap: () {
print('skip press');
if(isEmailValid && isPasswordValid && _emailController.text.isNotEmpty && _passwordController.text.isNotEmpty){
hitTheLoginAPI();
}
else {
isEmailValid = false;
isPasswordValid = false;
Util.showToast('Invalid username or password');
}
},
child: Container(
margin: EdgeInsets.only(right: 20, bottom: 35),
width: 80,
height: 80,
decoration: BoxDecoration(
shape: BoxShape.circle,
color: themeRedColor,
),
child: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Icon(
Icons.arrow_forward,
color: Colors.white,
),
Text(
'Skip',
style: TextStyle(color: Colors.white, fontSize: 17),
),
],
),
),
),
),
),
],
);
var child=Stack(
儿童:[
纵队(
mainAxisSize:mainAxisSize.max,
crossAxisAlignment:crossAxisAlignment.stretch,
儿童:[
扩大(
//弹性:90,
子:Image.asset(
“${Constants.imagesPath}登录封面bg.png”,
适合:BoxFit.cover,
),
),
扩大(
//弹性:100,
子:容器(
子:ListView(
儿童:[
容器(
填充:仅限边缘设置(顶部:50,左侧:25),
子:文本(
'请登录',
样式:TextStyle(
fontWeight:fontWeight.w500,
尺寸:22,
),
),
),
大小盒子(
身高:40,
),
扩大(
弹性:1,
子:容器(
颜色:颜色。橙色,
填充:仅限边缘设置(左:25,下:15,右:25),
孩子:TextField(
maxLines:1,
键盘类型:TextInputType.emailAddress,
提交:(){
_checkEmailValid();
FocusScope.of(context.nextFocus();
},
textInputAction:textInputAction.next,
控制器:\u电子邮件控制器,
装饰:输入装饰(
enabledBorder:UnderlineInputBorder(
borderSide:borderSide(颜色:disableRedColor),
//当TextFormField处于未聚焦状态时
),
FocusedOrder:下划线输入边框(
borderSide:borderSide(颜色:MeredColor),
//当TextFormField处于聚焦状态时
),
边框:下划线InputBorder(),
hintText:“电子邮件”,
errorText:isEmailValid==true?“”:“无效电子邮件”
),
),
),
),
扩大(
弹性:2,
子:容器(
颜色:颜色,黄色,
填充:仅限边设置(左:25,右:25),
孩子:TextField(
maxLines:1,
提交:(){
_checkPasswordValid();
(上下文)的焦点范围。取消焦点();
},
键盘类型:TextInputType.text,
textInputAction:textInputAction.done,
控制器:_passwordController,
装饰:输入装饰(
enabledBorder:UnderlineInputBorder(
borderSide:borderSide(颜色:disableRedColor),
//当TextFormField处于未聚焦状态时
),
FocusedOrder:下划线输入边框(
borderSide:borderSide(颜色:MeredColor),
//当TextFormField处于聚焦状态时
),
边框:下划线InputBorder(),
hintText:'密码',
errorText:isPasswordValid==true?“”:“无效密码”,
后缀:图标按钮(
图标:图标(
shouldObsureText==false?Icons.visibility:Icons.visibility\u关闭,
颜色:红色,
),
已按下:(){
设置状态(){
shouldObsureText=!shouldObsureText;
});
},
)
),
蒙蔽文本:应该蒙蔽文本,
),
),
),
大小盒子(
身高:65,
),
扩大(
弹性:1,
儿童:手势检测器(
onTap:(){
Util.navigateView(上下文,SignupScreen());
},
子:容器(
填充:仅限边设置(左:25,右:25),
孩子:排(
mainAxisAlignment:mainAxisAlignment.spaceBetween,
儿童:[
正文(
“忘记密码了吗?”,
样式:TextStyle(
fontWeight:fontWeight.w500,
SingleChildScrollView(
child:...
);