- r - 以节省内存的方式增长 data.frame
- ruby-on-rails - ruby/ruby on rails 内存泄漏检测
- android - 无法解析导入android.support.v7.app
- UNIX 域套接字与共享内存(映射文件)
我是 Flutter 的新手,尝试设计一个如图所示的登录屏幕,我拿了一列并一个一个地添加了所有小部件。但是来到底部我尝试了 mainAxisAlignment,crossAxisAlignment 仍然没有运气,底部是在屏幕上的登录按钮之后出现的,即没有帐户?和创建帐户。我需要屏幕左下角的那些字段。请帮助实现这一目标。
return MaterialApp(
debugShowCheckedModeBanner: false,
home: Scaffold(
backgroundColor: Color.fromRGBO(150, 169, 62, 1),
body: Column(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
Container(
alignment: Alignment.topCenter,
child: Container(
child: Image.asset('assets/logo_400.png'),
margin: const EdgeInsets.all(60.0),
width: 150.0,
height: 150.0,
),
),
Text(
'Log into your account',
style: TextStyle(color: Colors.white, fontSize: 25),
),
Container(
margin: const EdgeInsets.all(40.0),
child: Column(
children: <Widget>[
TextFormField(
decoration: const InputDecoration(
icon: Icon(
Icons.phone,
color: Colors.white,
),
hintText: '10 digit mobile number',
hintStyle: TextStyle(color: Colors.white)),
),
SizedBox(height: 20,),
TextFormField(
decoration: const InputDecoration(
// enabledBorder: const OutlineInputBorder(
// // width: 0.0 produces a thin "hairline" border
// borderSide: const BorderSide(
// color: Colors.white, width: 0.0),
// ),
// border: const OutlineInputBorder(),
suffixIcon: Icon(
Icons.remove_red_eye,
color: Colors.white,
),
icon: Icon(
Icons.lock,
color: Colors.white,
),
hintText: 'Password',
hintStyle: TextStyle(color: Colors.white)),
),
SizedBox(
height: 5,
),
Row(
mainAxisAlignment: MainAxisAlignment.end,
children: <Widget>[
FlatButton(
//color: Colors.blue,
textColor: Colors.white,
//disabledColor: Colors.grey,
//disabledTextColor: Colors.black,
padding: EdgeInsets.all(8.0),
splashColor: Colors.blueAccent,
onPressed: () {
/*...*/
},
child: Text(
"Forgot Password",
style: TextStyle(
fontSize: 15.0,
decoration: TextDecoration.underline),
),
),
],
),
SizedBox(
height: 25,
),
Container(
margin: EdgeInsets.all(25.0),
child: ButtonTheme(
minWidth: 300.0,
height: 50.0,
buttonColor: Colors.white,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10)),
child: RaisedButton(
//shape: StadiumBorder(),
onPressed: () {},
textColor: Colors.black,
padding: const EdgeInsets.all(0.0),
child: Text(
'Login',
style: TextStyle(fontSize: 20),
),
),
),
),
//Spacer(),
SizedBox(
height: 150,
),
Row(
mainAxisAlignment: MainAxisAlignment.end,
children: <Widget>[
Column(
crossAxisAlignment: CrossAxisAlignment.end,
children: <Widget>[
Text(
"Don't have a account?",
style: TextStyle(
color: Colors.white, fontSize: 15),
),
FlatButton(
//color: Colors.blue,
textColor: Colors.white,
//disabledColor: Colors.grey,
//disabledTextColor: Colors.black,
padding: EdgeInsets.all(8.0),
splashColor: Colors.blueAccent,
onPressed: () {
/*...*/
},
child: Text(
"Create Account",
style: TextStyle(
fontSize: 20.0,
decoration: TextDecoration.underline),
),
)
],
)
],
)
],
)),
],
)),
);
最佳答案
Don't have account? and Create Account. I need those fields in bottom left to the screen
改变
Row(mainAxisAlignment: MainAxisAlignment.end
到
Row(mainAxisAlignment: MainAxisAlignment.start
顺便说一句,您是否在横向环境中测试过这种布局?您应该将整个表单包装在 ListView 中,这样就不会出现溢出警告。
关于flutter - 如何将列的最后一项置于底部,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57308234/
我一直听到关于这个话题的相互矛盾的事实。什么是正确的? 最佳答案 你一直听到相互矛盾的观点,因为这是一个非常困惑的话题,即使在高级工程师中也是如此。简而言之,简单地将程序集放置在 GAC 中确实会隐含
我想看看 shlex对于我正在尝试构建的东西来说是一个不错的选择,所以我想我会把它放在 debug mode 中玩弄它。只有 shlex 的构造函数有这个 weird thing it does :
我想在订阅上设置拒绝规则,以便可以使用自定义角色覆盖贡献者访问权限(但有一些异常(exception)情况)。 我在 MS 门户 ( https://learn.microsoft.com/en-us
我在我的 centos 上手动安装了 Artifactory(V 2.6),并将它与自己的独立码头容器一起使用。我使用 artifactoryctl start 启动它,现在我可以使用 http://
我试图将 TextView 置于表格行内,该 TextView 本身位于表格布局内,但我想我错过了一些东西,因为 TextView 没有居中:s 这是我的方法: private void insert
如果问题已经问过,请随意将此帖子作为重复,我还没有找到与此相同的帖子 据我所知,没有必要return在 void 功能 ,例如: void ex () {printf ("Hi\n");} 但是,如果
我想要做的是将 JMenuItem 元素置于 JPopupMenu 的中心。这就是它们目前的样子 我希望它们位于中间而不是左侧。 这是我的代码的一些部分 JButton lvlBtn = ne
我想创建一个包含许多 JComboBox 的调色板。像这样: for(int x=0; x(new String[] { "First Option", "Second Option", "Third
我有一个 TabBar,我想在上面添加 UIButton,但它位于 tabBar 的后面: 图片( http://i.stack.imgur.com/RxGXb.png ) 如何将其置于前面并覆盖 T
如何以编程方式将 UIActivityViewIndicator 置于 UITableViewCell 中? 最佳答案 在 UITableViewController 的自定义子类中尝试类似的操作:
我似乎无法让 PHP 在 Javascript 标记内回显: places.push(new google.maps.LatLng("")); 我做错了什么? 最佳答案 你试过不加引号吗? place
我正在尝试将 X 和 Y 轴中心的 imageView 显示到 scrollView 上,当我运行应用程序时,它很好地适合设备的宽度。我还想平移和缩放imageView。我已经尝试了几乎所有已发布在
非常感谢您对我的问题提供帮助。 我正在使用 JavaFX 和 NetBeans IDE。我正在为桌面客户端制作一个非常简单的启动窗口。该窗口当前看起来像这个图像。 当前外观: 想要的外观(用油漆编辑)
在下面的屏幕截图中,复选框没有在上面的编辑文本下方居中。我怎样才能使复选框居中,使其在编辑文本的正下方居中? 我用来生成上述 UI 的布局是: 布局 XML 事情,我已经尝试过 Check
一直在尝试创建一个基本上具有背景的程序(使用 Paint() 绘制),然后在其上方放置一个带有图像的标签。 继续获取 Paint 下面的 JLabel... 有什么想法吗? 提前非常感谢。 publi
我在 ScrollView 布局内部的 React Native 项目中使用 FAB。正如预期的那样,FAB 位于 ScrollView 的末尾。 如何将它始终放在 ScrollView 的顶部? 下
尽管文本长度大小不同,但我试图将文本直接对齐在每个图标下方。在这张截图中,我希望一切都以这一行为中心: 我曾尝试使用线性和相对布局来获得我想要的内容,但没有成功。这段代码是我现在拥有的,也是最接近我想
我的应用程序运行良好,但我需要通过 SaveFormController 获取 SaveForm。我需要更改 ApplicationMainFormController 中的 ButtonFuncti
我试图将 UIImageView 置于 ScrollView 的中心。这是我尝试过的代码,但没有结果。 UIImageView *iv = [[UIImageView alloc] initWithI
我有一个包含 MKMapView 和 UIImageView 的 View 。 MKMapView 通过在其自动对齐上设置的约束来定位。对于 ImageView ,我想以编程方式将图像的中心定位在 I
我是一名优秀的程序员,十分优秀!