【问题标题】:How to make a Facebook post box in Flutter?如何在 Flutter 中制作 Facebook 邮箱?
【发布时间】:2021-09-26 09:58:03
【问题描述】:

我想在 Flutter 中制作一个这样的 Facebook 邮箱。 按下时,它将转到另一个页面。我怎样才能做到?

【问题讨论】:

    标签: flutter user-interface flutter-layout


    【解决方案1】:

    嗨 :) 您应该使用 MaterialPageRoute 在页面之间导航,我们开始??:

    请投票给 Yeasin Sheikh 的答案,但这是要投票的答案

    GestureDetector(
                onTap: () {
                  Navigator.push(context, MaterialPageRoute(builder: (context) => SecondRoute()),
                },
                child: Container(
                  height: 50,
                  width: 300,
                  alignment: Alignment.centerLeft,
                  padding: EdgeInsets.only(left: 12),
                  decoration: BoxDecoration(
                    color: Colors.black,
                    borderRadius: BorderRadius.circular(34),
                    border: Border.all(
                      color: Colors.grey,
                      width: 1.5,
                    ),
                  ),
                  child: Text(
                    "what's on your mind ?",
                    style: TextStyle(
                      color: Colors.white,
                    ),
                  ),
                ),
              ),
    

    【讨论】:

      【解决方案2】:

      更新了边框

       GestureDetector(
                  onTap: () {
                    print("Nav to page");
                  },
                  child: Container(
                    height: 50,
                    width: 300,
                    alignment: Alignment.centerLeft,
                    padding: EdgeInsets.only(left: 12),
                    decoration: BoxDecoration(
                      color: Colors.black,
                      borderRadius: BorderRadius.circular(34),
                      border: Border.all(
                        color: Colors.grey,
                        width: 1.5,
                      ),
                    ),
                    child: Text(
                      "what's on your mind ?",
                      style: TextStyle(
                        color: Colors.white,
                      ),
                    ),
                  ),
                ),
      

      【讨论】:

      • 欢迎您,如果可以接受答案。
      • 抱歉,我现在有问题。当我按下它时会弹出一个键盘栏,我只想转到一个新屏幕。我能怎么做。是因为你使用Textfield吗?
      • 与这个问题有关,我们可以解决吗?
      • 对不起,我没有注意到那么多,检查更新的答案。
      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2020-12-12
      • 1970-01-01
      • 2019-05-19
      • 1970-01-01
      • 1970-01-01
      • 2021-08-19
      • 2015-05-15
      相关资源
      最近更新 更多