在堆叠中使用定位内部无法正常工作

沙鹿

我正在使用具有卡片和定位元素的堆栈,如下图所示。这些位置元素包含按钮。我面临的问题是这些按钮的下部是隐藏的。我也没有给任何额外的利润。可能是因为底部导航部分。

图片

这是代码

  Stack(
                  children: <Widget>[
                    Card(
                      shape: RoundedRectangleBorder(
                          borderRadius: BorderRadius.circular(10.0)),
                      child: Padding(
                        padding: EdgeInsets.symmetric(
                            vertical: 40.0, horizontal: 20.0),
                        child: Row(
                          mainAxisAlignment: MainAxisAlignment.spaceBetween,
                          children: <Widget>[
                            Expanded(
                              child: Column(
                                crossAxisAlignment:
                                    CrossAxisAlignment.start,
                                children: <Widget>[
                                  Container(
                                    width: size.width * 0.2,
                                    child: StreamBuilder<String>(
                                        stream: bloc.skills,
                                        builder: (context, snapshot) {
                                          return TextField(
                                            onChanged: bloc.changeSkills,
                                            decoration: new InputDecoration(
                                                contentPadding:
                                                    EdgeInsets.symmetric(
                                                        vertical: 0,
                                                        horizontal: 15.0),
                                                border: new OutlineInputBorder(
                                                    borderSide:
                                                        const BorderSide(
                                                            width: 2.0,
                                                            style:
                                                                BorderStyle
                                                                    .solid),
                                                    borderRadius:
                                                        BorderRadius
                                                            .circular(
                                                                50.0)),
                                                focusedBorder:
                                                    OutlineInputBorder(
                                                  borderSide:
                                                      const BorderSide(
                                                          color:
                                                              Colors.grey,
                                                          width: 2.0),
                                                  borderRadius:
                                                      BorderRadius.circular(
                                                          50.0),
                                                ),
                                                hintText: 'Skills',
                                                hintStyle: new TextStyle(
                                                    color: Colors.grey,
                                                    fontWeight:
                                                        FontWeight.bold),
                                                errorText: snapshot.error),
                                          );
                                        }),
                                  ),
                                  SizedBox(height: 20.0),
                                  Container(
                                    width: size.width * 0.2,
                                    child: StreamBuilder<String>(
                                        stream: bloc.role,
                                        builder: (context, snapshot) {
                                          return TextField(
                                            onChanged: bloc.changeRole,
                                            decoration: new InputDecoration(
                                                contentPadding:
                                                    EdgeInsets.symmetric(
                                                        vertical: 0,
                                                        horizontal: 15.0),
                                                border: new OutlineInputBorder(
                                                    borderSide:
                                                        const BorderSide(
                                                            width: 2.0,
                                                            style:
                                                                BorderStyle
                                                                    .solid),
                                                    borderRadius:
                                                        BorderRadius
                                                            .circular(
                                                                50.0)),
                                                focusedBorder:
                                                    OutlineInputBorder(
                                                  borderSide:
                                                      const BorderSide(
                                                          color:
                                                              Colors.grey,
                                                          width: 2.0),
                                                  borderRadius:
                                                      BorderRadius.circular(
                                                          50.0),
                                                ),
                                                hintText: 'Role',
                                                hintStyle: new TextStyle(
                                                    color: Colors.grey,
                                                    fontWeight:
                                                        FontWeight.bold),
                                                errorText: snapshot.error),
                                          );
                                        }),
                                  ),
                                ],
                              ),
                            ),
                            Expanded(
                              child: Column(
                                crossAxisAlignment: CrossAxisAlignment.end,
                                children: <Widget>[
                                  Container(
                                    width: size.width * 0.2,
                                    child: StreamBuilder<String>(
                                        stream: bloc.language,
                                        builder: (context, snapshot) {
                                          return TextField(
                                            onChanged: bloc.changeLanguage,
                                            decoration: new InputDecoration(
                                                contentPadding:
                                                    EdgeInsets.symmetric(
                                                        vertical: 0,
                                                        horizontal: 15.0),
                                                border: new OutlineInputBorder(
                                                    borderSide:
                                                        const BorderSide(
                                                            width: 2.0,
                                                            style:
                                                                BorderStyle
                                                                    .solid),
                                                    borderRadius:
                                                        BorderRadius
                                                            .circular(
                                                                50.0)),
                                                focusedBorder:
                                                    OutlineInputBorder(
                                                  borderSide:
                                                      const BorderSide(
                                                          color:
                                                              Colors.grey,
                                                          width: 2.0),
                                                  borderRadius:
                                                      BorderRadius.circular(
                                                          50.0),
                                                ),
                                                hintText: 'Language',
                                                hintStyle: new TextStyle(
                                                    color: Colors.grey,
                                                    fontWeight:
                                                        FontWeight.bold),
                                                errorText: snapshot.error),
                                          );
                                        }),
                                  ),
                                  SizedBox(height: 20.0),
                                  Container(
                                    width: size.width * 0.2,
                                    child: StreamBuilder<String>(
                                        stream: bloc.gender,
                                        builder: (context, snapshot) {
                                          return DropdownButtonHideUnderline(
                                            child:
                                                new DropdownButtonFormField<
                                                    String>(
                                              items: <String>[
                                                'Female',
                                                'Male',
                                                'Other'
                                              ].map((String value) {
                                                return new DropdownMenuItem<
                                                    String>(
                                                  value: value,
                                                  child: new Text(value),
                                                );
                                              }).toList(),
                                              onChanged: bloc.changeGender,
                                              decoration:
                                                  new InputDecoration(
                                                      contentPadding:
                                                          EdgeInsets
                                                              .symmetric(
                                                                  vertical:
                                                                      0,
                                                                  horizontal:
                                                                      15.0),
                                                      border: new OutlineInputBorder(
                                                          borderSide:
                                                              const BorderSide(
                                                                  width:
                                                                      2.0,
                                                                  style: BorderStyle
                                                                      .solid),
                                                          borderRadius:
                                                              BorderRadius
                                                                  .circular(
                                                                      50.0)),
                                                      focusedBorder:
                                                          OutlineInputBorder(
                                                        borderSide:
                                                            const BorderSide(
                                                                color: Colors
                                                                    .grey,
                                                                width: 2.0),
                                                        borderRadius:
                                                            BorderRadius
                                                                .circular(
                                                                    50.0),
                                                      ),
                                                      hintText: 'Gender',
                                                      hintStyle:
                                                          new TextStyle(
                                                              color: Colors
                                                                  .grey,
                                                              fontWeight:
                                                                  FontWeight
                                                                      .bold),
                                                      errorText:
                                                          snapshot.error),
                                            ),
                                          );
                                        }),
                                  )
                                ],
                              ),
                            ),
                          ],
                        ),
                      ),
                    ),
                    Positioned(
                        left: size.width * 0.02,
                        top: size.height * 0.58 + 2,
                        child: new Container(
                          width: 100.0,
                          height: 40.0,
                          decoration: BoxDecoration(
                              borderRadius: BorderRadius.circular(50.0),
                              color: Colors.white,
                              border: Border.all(
                                  width: 2.0, color: Colors.grey)),
                          child: Align(
                            alignment: Alignment.center,
                            child: new Text(
                              'Back',
                              style: TextStyle(
                                  color: Colors.grey,
                                  fontWeight: FontWeight.bold),
                            ),
                          ),
                        )),
                    Positioned(
                        right: size.width * 0.02,
                        top: size.height * 0.58 + 2,
                        child: new Container(
                          width: 100.0,
                          height: 40.0,
                          decoration: BoxDecoration(
                            borderRadius: BorderRadius.circular(50.0),
                            color: primaryColor,
                            // border: Border.all(width: 2.0, color: Colors.grey)
                          ),
                          child: Align(
                            alignment: Alignment.center,
                            child: new Text(
                              'Create',
                              style: TextStyle(
                                  color: Colors.white,
                                  fontWeight: FontWeight.bold),
                            ),
                          ),
                        )),
                  ],
                ),
伊克法

添加overflow: Overflow.visible,Stack

本文收集自互联网,转载请注明来源。

如有侵权,请联系[email protected] 删除。

编辑于
0

我来说两句

0条评论
登录后参与评论

相关文章

来自分类Dev

引导轮播无法正常工作:堆叠图片(使用导轨)

来自分类Dev

在Hibernate中使用Map无法正常工作

来自分类Dev

在Angular中使用toFixed()无法正常工作

来自分类Dev

使用foreach内部codeigniter模型爆炸,无法正常工作

来自分类Dev

相对定位无法正常工作CSS

来自分类Dev

固定位置无法正常工作

来自分类Dev

相对定位无法正常工作CSS

来自分类Dev

定位标记onclick无法正常工作

来自分类Dev

JScrollPane 内部的内部 JScrollPane 无法正常工作

来自分类Dev

使用jquery.flot.tooltip的堆叠图中的百分比的%p无法正常工作

来自分类Dev

更新在PHP中使用PDO无法正常工作

来自分类Dev

在表中使用ng-transclude似乎无法正常工作

来自分类Dev

您在函数无法正常工作的Clojure中使用宏的位置

来自分类Dev

在for循环中使用时,拼接无法正常工作

来自分类Dev

在提取API中使用FormData()无法正常工作

来自分类Dev

在SUM中使用CASE进行SQL查询无法正常工作

来自分类Dev

在SQL中使用AND和方括号分组无法正常工作

来自分类Dev

在过程中使用dblink插入无法正常工作

来自分类Dev

黄页API无法在php中使用Curl正常工作

来自分类Dev

在SELECT中使用CASE进行SQL查询无法正常工作

来自分类Dev

链接选择在Joomla模块中使用jQuery无法正常工作

来自分类Dev

在textarea中使用replace后,jQuery追加无法正常工作

来自分类Dev

在SELECT中使用计算的SQL查询无法正常工作

来自分类Dev

在shell脚本中使用docker登录无法正常工作

来自分类Dev

在C#中使用参数命令更新无法正常工作

来自分类Dev

在字段“源”中使用Sitecore查询无法正常工作

来自分类Dev

在Swift中使用注释-.addAnnotation()无法正常工作

来自分类Dev

在PHP中使用.htaccess重写URL无法正常工作

来自分类Dev

在 xslt 3.0 中使用累加器无法正常工作

Related 相关文章

  1. 1

    引导轮播无法正常工作:堆叠图片(使用导轨)

  2. 2

    在Hibernate中使用Map无法正常工作

  3. 3

    在Angular中使用toFixed()无法正常工作

  4. 4

    使用foreach内部codeigniter模型爆炸,无法正常工作

  5. 5

    相对定位无法正常工作CSS

  6. 6

    固定位置无法正常工作

  7. 7

    相对定位无法正常工作CSS

  8. 8

    定位标记onclick无法正常工作

  9. 9

    JScrollPane 内部的内部 JScrollPane 无法正常工作

  10. 10

    使用jquery.flot.tooltip的堆叠图中的百分比的%p无法正常工作

  11. 11

    更新在PHP中使用PDO无法正常工作

  12. 12

    在表中使用ng-transclude似乎无法正常工作

  13. 13

    您在函数无法正常工作的Clojure中使用宏的位置

  14. 14

    在for循环中使用时,拼接无法正常工作

  15. 15

    在提取API中使用FormData()无法正常工作

  16. 16

    在SUM中使用CASE进行SQL查询无法正常工作

  17. 17

    在SQL中使用AND和方括号分组无法正常工作

  18. 18

    在过程中使用dblink插入无法正常工作

  19. 19

    黄页API无法在php中使用Curl正常工作

  20. 20

    在SELECT中使用CASE进行SQL查询无法正常工作

  21. 21

    链接选择在Joomla模块中使用jQuery无法正常工作

  22. 22

    在textarea中使用replace后,jQuery追加无法正常工作

  23. 23

    在SELECT中使用计算的SQL查询无法正常工作

  24. 24

    在shell脚本中使用docker登录无法正常工作

  25. 25

    在C#中使用参数命令更新无法正常工作

  26. 26

    在字段“源”中使用Sitecore查询无法正常工作

  27. 27

    在Swift中使用注释-.addAnnotation()无法正常工作

  28. 28

    在PHP中使用.htaccess重写URL无法正常工作

  29. 29

    在 xslt 3.0 中使用累加器无法正常工作

热门标签

归档